全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 336|回复: 5
打印 上一主题 下一主题

[疑问] CentOS 安装ruby环境后安装bundler打开.SH提示bundle: command not found

[复制链接]
跳转到指定楼层
1#
发表于 2022-6-14 10:44:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 破影成双 于 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
各位大佬,请问这该如何解决?
2#
 楼主| 发表于 2022-6-14 10:58:54 | 只看该作者
各位大佬,解答一下
3#
发表于 2022-6-14 11:06:42 | 只看该作者
有没有可能用bash就行?CentOS见一次踩一脚。
4#
发表于 2022-6-14 11:06:49 | 只看该作者
你把 1.sh 贴出来嘛
5#
 楼主| 发表于 2022-6-14 11:31:52 | 只看该作者
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
6#
发表于 2022-6-14 12:38:11 | 只看该作者
yum install rake thin -y
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-13 18:41 , Processed in 0.063212 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表