Rails控制檯在我的生產服務器上不起作用。這是發生了什麼:無法啓動Rails控制檯
[email protected]:/webapps/myapp/current# rails c
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- rails/cli (LoadError)
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/gems/[email protected]/gems/rails-3.0.5/bin/rails:8:in `rescue in <main>'
from /usr/local/rvm/gems/[email protected]/gems/rails-3.0.5/bin/rails:3:in `<main>'
以前我漸漸的ReadLine相關的錯誤,這裏解釋:Problems with the rails console, RVM and readline
我試過propsoed修復,現在我沒有收到readline的錯誤。仍然控制檯不會啓動。
這裏是RVM信息輸出:
ruby-1.9.3-p194:
system:
uname: "Linux 111items 2.6.38-linode31 #1 SMP Mon Mar 21 21:22:33 UTC 2011 i686 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.13.4() by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]"
updated: "53 minutes 38 seconds ago"
ruby:
interpreter: "ruby"
version: "1.9.3p194"
date: "2012-04-20"
platform: "i686-linux"
patchlevel: "2012-04-20 revision 35410"
full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]"
homes:
gem: "/usr/local/rvm/gems/ruby-1.9.3-p194"
ruby: "/usr/local/rvm/rubies/ruby-1.9.3-p194"
binaries:
ruby: "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby"
irb: "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/irb"
gem: "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/gem"
rake: "/usr/local/rvm/gems/[email protected]/bin/rake"
environment:
PATH: "/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/[email protected]/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
GEM_HOME: "/usr/local/rvm/gems/ruby-1.9.3-p194"
GEM_PATH: "/usr/local/rvm/gems/ruby-1.9.3-p194:/usr/local/rvm/gems/[email protected]"
MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.3-p194"
IRBRC: "/usr/local/rvm/rubies/ruby-1.9.3-p194/.irbrc"
RUBYOPT: ""
gemset: ""
本地我總是能夠推出軌道控制檯,但在遠程機器上的東西是不同的。
upd:目前爲止,我的最佳猜測是Rails缺少「rails/cli」的正確路徑。必須研究並瞭解如何解決這個問題。
是否打算使用root用戶運行'rails c'? – gmile
它會影響Rails控制檯嗎? –
不確定。我只是建議作爲調試過程的一部分:-) – gmile