运行此命令时出现此错误 rails g mongoid:config. 有没有人有任何想法
/home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/history.rb:1:in `require': cannot load such file -- readline (LoadError)
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/history.rb:1:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/interface.rb:1:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/interface.rb:1:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/core.rb:5:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/core.rb:5:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug.rb:1:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug.rb:1:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:76:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:72:in `each'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:72:in `block in require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:61:in `each'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:61:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler.rb:134:in `require'
from /home/gardezi/blog/config/application.rb:7:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:82:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:82:in `preload'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:143:in `serve'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:131:in `block in run'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:125:in `loop'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:125:in `run'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
我运行的命令如下:
宝石安装 mongoid
导轨新博客
gedit /blog/Gemfile 我在其中写了 gem 'mongoid', '4.0.2' gem 'bson_ext'
然后我跑了 bundle
然后是 rails g mongoid:config
多亏了 Shweta,rails g 命令现在没有给出错误,但现在我遇到了另一个问题,那就是当我运行这个命令时,它会在无限循环中运行。已经七个小时了,还在运行,所以请告诉我该怎么办。
提前致谢