全球主机交流论坛

标题: CentOS 安装ruby环境后安装bundler打开.SH提示bundle: command not found [打印本页]

作者: 破影成双    时间: 2022-6-14 10:44
标题: CentOS 安装ruby环境后安装bundler打开.SH提示bundle: command not found
本帖最后由 破影成双 于 2022-6-14 11:36 编辑

CentOS 7 安装ruby-2.1.10环境正常

gem 版本 2.0.14.1
[root@web ruby-2.1.10]# gem -v
2.0.14.1

安装bundler -v 1.17.3
[root@web ruby-2.1.10]# gem install bundler -v 1.17.3  
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
1 gem installed

最后执行.sh命令 出现这个错误 找不到命令 是bundler的问题吗?
[root web]# sh 1.sh
1.sh: line 1: bundle: command not found
1.sh: line 2: rake: command not found
1.sh: line 3: rake: command not found
1.sh: line 4: thin: command not found
1.sh: line 5: thin: command not found

1.sh文件:
bundle install
rake db:create RAILS_ENV=alpha
rake db:migrate RAILS_ENV=alpha
thin stop -p 7200 -d -e alpha
thin start -p 7200 -d -e alpha


好久没用CentOS了,试了下其他的命令也是提示XXX: command not found
各位大佬,请问这该如何解决?

作者: 破影成双    时间: 2022-6-14 10:58
各位大佬,解答一下
作者: js攻城狮    时间: 2022-6-14 11:06
有没有可能用bash就行?CentOS见一次踩一脚。
作者: thaizxj    时间: 2022-6-14 11:06
你把 1.sh 贴出来嘛
作者: 破影成双    时间: 2022-6-14 11:31
thaizxj 发表于 2022-6-14 11:06
你把 1.sh 贴出来嘛

bundle install
rake db:create RAILS_ENV=alpha
rake db:migrate RAILS_ENV=alpha
thin stop -p 7200 -d -e alpha
thin start -p 7200 -d -e alpha

作者: 唐王李世民    时间: 2022-6-14 12:38
yum install rake thin -y




欢迎光临 全球主机交流论坛 (https://loc.010206.xyz/) Powered by Discuz! X3.4