Ruby rbenv 下,gem install rails 安装 rails 后,rails new blog 出问题了。

u1384048594 · 2014年03月18日 · 最后由 pynix 回复于 2014年03月18日 · 2732 次阅读

错误信息如下: /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:in require': /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/md5.so: undefined symbol: rb_Digest_MD5_Init - /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/md5.so (LoadError) from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.4/lib/rails/generators/app_base.rb:1:in <top (required)>' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:in require' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.4/lib/rails/generators/rails/app/app_generator.rb:1:in' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:in require' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.4/lib/rails/commands/application.rb:29:in <top (required)>' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:in require' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.4/lib/rails/cli.rb:15:in' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:in require' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /home/zengfb/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.4/bin/rails:9:in <top (required)>' from /home/zengfb/.rbenv/versions/2.1.0/bin/rails:23:inload' from /home/zengfb/.rbenv/versions/2.1.0/bin/rails:23:in `

'

说的是 cd 到源码下面的 ext\digest\sha1ext\digest\md5 目录下,然后运行ruby extconf.rb; make; make install

楼主自己不觉得格式很难看吗?

ABI 不兼容?

需要 登录 后方可回复, 如果你还没有账号请 注册新账号