我在使用 rails 控制台时遇到问题,这是我尝试启动 rails 控制台时遇到的问题:
backo@speedy:~/ucimrails/simple_app$ rails c --sandbox /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251 :in
require': no such file to load -- test/unit/ui/console/testrunner (LoadError) from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in
block in require' from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:inload_dependency' from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in
require' from /home/ backo/.rvm/gems/ruby-1.9.2-p320/gems/redgreen-1.2.2/lib/redgreen.rb:2:in<top (required)>' from /home/backo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in
require'来自/home/backo/.rvm/gems/ruby-1.9.2 -p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:inblock (2 levels) in require' from /home/backo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in
each' from /home/backo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler -1.1.4/lib/bundler/runtime.rb:66:inblock in require' from /home/backo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in
each' 来自 /home/backo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler /runtime.rb:55:inrequire' from /home/backo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler.rb:119:in
来自 /home/backo/ucimrails/simple_app/config/application.rb:13<top (required)>' from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.2/lib/rails/commands.rb:39:in
的要求:来自 /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.2/ 的要求lib/rails/commands.rb:39:in<top (required)>' from script/rails:6:in
require' from script/rails:6:in `'
我发现问题是由红绿宝石引起的。当我从 Gemfile 中排除它时,控制台再次工作。但是,有人可以帮我让它与红绿宝石一起使用吗?有趣的是,这仅发生在我的上网本上,当我在台式计算机上工作时,rails 控制台一切正常。