0

长话短说,我启动了我的系统,当我告诉 Rubymine 运行开发时,我得到了这个。

/home/barnabus/.rvm/rubies/ruby-1.9.3-p385/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/barnabus/Projects/Ruby/houston/script/rails server -b 0.0.0.0 -p 3000 -e development
/home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/metal/mime_responds.rb:9:in `<module:MimeResponds>': /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:10: syntax error, unexpected tINTEGER, expecting keyword_end (SyntaxError)
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/metal/mime_responds.rb:6:in `<module:ActionController>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/metal/mime_responds.rb:5:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/base.rb:196:in `<class:Base>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/base.rb:171:in `<module:ActionController>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/base.rb:3:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/cancan-1.6.10/lib/cancan/controller_additions.rb:394:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/cancan-1.6.10/lib/cancan.rb:4:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:68:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:66:in `each'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:66:in `block in require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:55:in `each'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:55:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler.rb:128:in `require'
from /home/barnabus/Projects/Ruby/houston/config/application.rb:7:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.8/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from /home/barnabus/Projects/Ruby/houston/script/rails:6:in `require'
from /home/barnabus/Projects/Ruby/houston/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1

我从来没有见过这个错误,而且我真的不知道在哪里以及如何进行,因为很多这种情况都发生在框架代码中。

任何帮助是极大的赞赏。

4

1 回答 1

0

诀窍是看到它是一颗正在发挥作用的宝石。所以我去运行它卸载了gem。

bundle exec gem uninstall actionpack

它抱怨依赖关系。

You have requested to uninstall the gem:
actionpack-3.2.8
actionmailer-3.2.8 depends on [actionpack (= 3.2.8)]
railties-3.2.8 depends on [actionpack (= 3.2.8)]
rails-3.2.8 depends on [actionpack (= 3.2.8)]
rspec-rails-2.12.2 depends on [actionpack (>= 3.0)]
simple_form-2.0.4 depends on [actionpack (~> 3.0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]  Y

但这没关系,因为我们要重新安装它。

Successfully uninstalled actionpack-3.2.8
ERROR:  While executing gem ... (NoMethodError)
undefined method `delete' for #<Bundler::SpecSet:0x00000002c53b20>

完成后,我不得不重新安装它,然后我就跑了

bundle install

而我又回到了正轨。

于 2013-07-17T03:32:30.390 回答