gourav@ubuntu$ bundle install
/home/gourav/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/i686-linux/digest/sha1.so:
undefined symbol: rb_Digest_SHA1_Init -
/home/gourav/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/i686-linux/digest/sha1.so
gourav@ubuntu$ gem li
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.10)
actionpack (3.0.10)
activ开发者_开发技巧emodel (3.0.10)
activerecord (3.0.10)
activeresource (3.0.10)
activesupport (3.0.10)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.18)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
polyglot (0.3.2)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.10)
railties (3.0.10)
rake (0.9.2)
rdoc (3.9.2)
thor (0.14.6)
treetop (1.4.10)
tzinfo (0.3.29)
Run rvm notes
and make sure to run whatever it tells you to, then recompile (rvm install 1.8.7
) ruby.
Most likely, if you're on current RVM, you'll be told to do this:
apt-get install build-essential bison openssl libreadline6 libreadline6-dev
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev
libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev
autoconf libc6-dev ncurses-dev automake
I encountered this issue on a CentOS server that was not using rvm. When running script/console, ruby would complain about rb_Digest_SHA1_Init. When running script/server, ruby would complain about rb_Digest_MD5_Init.
After many rebuilds of ruby, and after installing (via yum) all the extra packages that this and other posts suggested, the thing that finally fixed it for me was the addition of --enable-pthread when configuring the ruby build.
So,
Install all the devel tools suggested by Dylan Markow. If using yum, run
yum search <name>
where is a simplified version of 'ncurses-dev' or 'libxml2-dev'. All other posts on the subject use apt-get, and that wasted a lot of time for me.
Rebuild ruby with the --enable-pthread param;
./configure --enable-pthread && make && make install
I get the same error. I tried to uninstall libssl-dev and it fixed this ... now my ruby has no ssl support whatsoever.
精彩评论