ruby-on-rails – 如何在我的ubuntu服务器上启动rails console
作者:互联网
我正在调试我的ubuntu服务器上的rails应用程序的问题,我正在尝试启动rails控制台来运行命令,但这是当我尝试启动控制台时会发生的情况:
myuser@rails-server1:/var/www/myapp/current$rails c
The program 'rails' can be found in the following packages:
* ruby-railties-3.2
* ruby-railties-4.0
Try: sudo apt-get install <selected package>
Rails肯定安装,因为我的应用程序正在运行并且gem已安装在此目录中:
/var/www/myapp/shared/bundle/ruby/2.0.0/gems
那我怎么能真正启动rails控制台呢?
解决方法:
捆绑执行到救援:
$bundle exec rails console
标签:ubuntu,linux,ruby-on-rails,rubygems 来源: https://codeday.me/bug/20190717/1490043.html