在启动先前运行的rails应用程序rails server
时出现以下错误。
/home/ganesh/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.5/lib/action_dispatch.rb:35:in `require': cannot load such file -- rack (LoadEr
ror)
from /home/ganesh/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.5/lib/action_dispatch.rb:35:in `<top (required)>'
from /home/ganesh/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.5/lib/rails/commands/server.rb:3:in `require'
from /home/ganesh/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.5/lib/rails/commands/server.rb:3:in `<top (required)>'
from /home/ganesh/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.5/lib/rails/commands.rb:49:in `require'
from /home/ganesh/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.5/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
如何删除此错误。帮助我。
答案 0 :(得分:1)
首先,您使用的服务也很重要。
打开命令窗口并输入:
irb --simple-prompt
>> require 'rack'
=> true
>>
如果没有机架,您将收到如下错误:
LoadError: no such file to load -- rack
您可以通过打开新的命令窗口并键入:
来安装机架gem install rack
同时检查,您是否尝试运行命令
rails s
来自您的应用程序文件夹?