当我发送到后台时,为什么rails控制台会破坏我的shell?

时间:2015-10-20 04:37:47

标签: ruby-on-rails

在某些项目中会发生这种情况,但我还没有找到原因。如果我打开一个rails控制台然后将它发送到后台,它似乎继续运行但只接受我输入的第一个字符作为命令并返回NameError: undefined local variable or method 'w/e' for main:Object

例如这......

bash-3.2$ rails c
Loading development environment (Rails 4.2.0)
irb(main):001:0> 
[1]+  Stopped                 rails c
bash-3.2$ ls
NameError: undefined local variable or method `l' for main:Object
from (irb):1
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in `start'
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/geerm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /Users/geerm/Sites/siece/bin/rails:8:in `<top (required)>'

0 个答案:

没有答案