一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

解决rails server 错误问题

时间:2014-11-18 编辑:简简单单 来源:一聚教程网

sam@linux-qo4p:~/front/ror|master⚡⇒  rails server
Ignoring RedCloth-4.2.9 because its extensions are not built.  Try: gem pristine RedCloth-4.2.9
Ignoring posix-spawn-0.3.9 because its extensions are not built.  Try: gem pristine posix-spawn-0.3.9
Ignoring rdiscount-2.1.7.1 because its extensions are not built.  Try: gem pristine rdiscount-2.1.7.1
/usr/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler/setup (LoadError)
        from /usr/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/sam/front/ror/config/boot.rb:4:in `'
        from bin/rails:3:in `require_relative'
        from bin/rails:3:in `

'

这似乎是我把 openSUSE 系统从 13.1 升级到 13.2 后才出现的错误。
我的情况里,尝试错误信息中的提示方法 gem pristine RedCloth 并不能消除以上错误。
最后的解决办法是:

gem pristine --all

切换到项目根目录,bundle install

再次跑 rails server,可以正常启动不报错。此后,rails new 新建的项目也不再报错

热门栏目