"undefined symbol: rb_Digest_MD5_Init" 而 运行 Rails
"undefined symbol: rb_Digest_MD5_Init" while running Rails
我正在尝试 运行 Ruby 在 Rails 上,但每次我启动它时(即使我 运行 rails
没有参数,当它应该显示一些帮助)它产生一个错误:
serge1peshcoff@myLaptop:~$ rails
/home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/x86_64-linux/digest/md5.so: undefined symbol: rb_Digest_MD5_Init - /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/x86_64-linux/digest/md5.so (LoadError)
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/lib/rails/generators/app_base.rb:1:in `<top (required)>'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/lib/rails/generators/rails/app/app_generator.rb:1:in `<top (required)>'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/lib/rails/commands/application.rb:2:in `<top (required)>'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/lib/rails/cli.rb:14:in `<top (required)>'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/bin/rails:9:in `<top (required)>'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/bin/rails:23:in `load'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/bin/rails:23:in `<main>'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
我在安装 nokogiri
gem 时遇到了同样的错误,但我使用 --use-system-libraries
解决了它,它安装得很好。我试过用同样的方法安装rails
,还是不行。
我也尝试安装 libssl-dev
(一些谷歌搜索让我遇到了 SO 问题,错误与我的相同)但它已经安装了。
我正在使用最新版本的 RVM
(1.26.11)、ruby
(2.2.3) 和 rails
(4.2.4)。
什么会导致这样的错误?
UPD:我见过 this answer,它有唯一的答案告诉我安装一些软件包,但没有成功
我的个人资料文件夹好像乱七八糟,因为我尝试创建新用户并在之后安装 rvm
和 rails
,一切正常。
UPD:问题似乎来自 ~/.config
,因为在删除了一些文件夹后(无法准确判断是哪个,因为我一次删除了一堆)Rails终于开始工作了。
我正在尝试 运行 Ruby 在 Rails 上,但每次我启动它时(即使我 运行 rails
没有参数,当它应该显示一些帮助)它产生一个错误:
serge1peshcoff@myLaptop:~$ rails
/home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/x86_64-linux/digest/md5.so: undefined symbol: rb_Digest_MD5_Init - /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/x86_64-linux/digest/md5.so (LoadError)
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/lib/rails/generators/app_base.rb:1:in `<top (required)>'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/lib/rails/generators/rails/app/app_generator.rb:1:in `<top (required)>'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/lib/rails/commands/application.rb:2:in `<top (required)>'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/lib/rails/cli.rb:14:in `<top (required)>'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/gems/railties-4.2.4/bin/rails:9:in `<top (required)>'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/bin/rails:23:in `load'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/bin/rails:23:in `<main>'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /home/serge1peshcoff/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
我在安装 nokogiri
gem 时遇到了同样的错误,但我使用 --use-system-libraries
解决了它,它安装得很好。我试过用同样的方法安装rails
,还是不行。
我也尝试安装 libssl-dev
(一些谷歌搜索让我遇到了 SO 问题,错误与我的相同)但它已经安装了。
我正在使用最新版本的 RVM
(1.26.11)、ruby
(2.2.3) 和 rails
(4.2.4)。
什么会导致这样的错误?
UPD:我见过 this answer,它有唯一的答案告诉我安装一些软件包,但没有成功
我的个人资料文件夹好像乱七八糟,因为我尝试创建新用户并在之后安装 rvm
和 rails
,一切正常。
UPD:问题似乎来自 ~/.config
,因为在删除了一些文件夹后(无法准确判断是哪个,因为我一次删除了一堆)Rails终于开始工作了。