babalooi
babalooi

Reputation: 159

Load error while creating new Rails application

When creating new Rails app I get this error

<internal:lib/rubygems/custom_require>:29:in `require': libcrypto.so.0.9.8: cannot open shared object file: No such file or directory - /share/Ruby/192p290/lib/ruby/1.9.1/armv5tel-linux-eabi/digest/md5.so (LoadError)
  from <internal:lib/rubygems/custom_require>:29:in `require'
  from /share/Ruby/192p290/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/generators/rails/app/app_generator.rb:1:in `<top (required)>'
  from <internal:lib/rubygems/custom_require>:29:in `require'
  from <internal:lib/rubygems/custom_require>:29:in `require'
  from /share/Ruby/192p290/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/commands/application.rb:16:in `<top (required)>'
  from <internal:lib/rubygems/custom_require>:29:in `require'
  from <internal:lib/rubygems/custom_require>:29:in `require'
  from /share/Ruby/192p290/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/cli.rb:14:in `<top (required)>'
  from <internal:lib/rubygems/custom_require>:29:in `require'
  from <internal:lib/rubygems/custom_require>:29:in `require'
  from /share/Ruby/192p290/lib/ruby/gems/1.9.1/gems/rails-3.0.9/bin/rails:8:in `rescue in <top (required)>'
  from /share/Ruby/192p290/lib/ruby/gems/1.9.1/gems/rails-3.0.9/bin/rails:3:in `<top (required)>'
  from /share/Ruby/192p290/bin/rails:19:in `load'
  from /share/Ruby/192p290/bin/rails:19:in `<main>'

Error says 'No such file or directory' but file exists.

[~] # cd /share/Ruby/192p290/lib/ruby/1.9.1/armv5tel-linux-eabi/digest && ls 
bubblebabble.so* rmd160.so*       sha2.so*
md5.so*          sha1.so*

versions:
ruby 1.9.2p290 (2011-07-09 revision 32553) [armv5tel-linux-eabi]
Rails 3.0.9
gem 1.3.7

Ruby is installed from source in custom directory and added to $PATH.

Edit: Forgot to mention it that I'm trying to install it on QNAP TS-412. It's running on arm linux.

Edit:
Managed to install RVM. Installed ruby 1.9.2 p320 and still getting error.

/opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': libcrypto.so.0.9.8: cannot open shared object file: No such file or directory - /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/armv5tel-linux-eabi/digest/md5.so (LoadError)
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/generators/app_base.rb:1:in `<top (required)>'
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/generators/rails/app/app_generator.rb:1:in `<top (required)>'
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/commands/application.rb:24:in `<top (required)>'
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/cli.rb:15:in `<top (required)>'
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/bin/rails:7:in `<top (required)>'
    from /opt/rvm/gems/ruby-1.9.2-p320/bin/rails:23:in `load'
    from /opt/rvm/gems/ruby-1.9.2-p320/bin/rails:23:in `<main>'

Edit:
Uninstalled RVM and installed ruby again from source. Still getting error.

File md5.so does exist

[/share/Web] # cd /opt/local/lib/ruby/1.9.1/armv5tel-linux-eabi/digest/
[/opt/local/lib/ruby/1.9.1/armv5tel-linux-eabi/digest] # ls -l
-rwxr-xr-x    1 admin    administ    12338 May 10 19:56 bubblebabble.so*
-rwxr-xr-x    1 admin    administ    17847 May 10 19:56 md5.so*
-rwxr-xr-x    1 admin    administ    27764 May 10 19:56 rmd160.so*
-rwxr-xr-x    1 admin    administ    23159 May 10 19:56 sha1.so*
-rwxr-xr-x    1 admin    administ    39475 May 10 19:56 sha2.so*

Edit:
Ruby somehow is not linked to crypto library correctly.

ruby -e 'require "digest/md5"'

This throws same error.

Any idea how to make link?

Edit:

Tried to make links to libraries using

export LD_LIBRARY_PATH=/share/MD0_DATA/.qpkg/Optware/local/lib/ruby/1.9.1/armv5tel-linux-eabi/digest:$LD_LIBRARY_PATH
export RUBYLIB=/share/MD0_DATA/.qpkg/Optware/local/lib/ruby/1.9.1/armv5tel-linux-eabi/digest:$RUBYLIB

but i don't know if I'm doing it right.

Upvotes: 0

Views: 2869

Answers (2)

babalooi
babalooi

Reputation: 159

Finaly solved.

ln -s /share/MD0_DATA/.qpkg/Optware/lib/libcrypto.so.0.9.8 /lib/libcrypto.so.0.9.8

did the trick.

Upvotes: 1

Kevin Bedell
Kevin Bedell

Reputation: 13404

I'd recommend installing Ruby using RVM. The custom install of Ruby you have might have not be linked in to the crypto library correctly.

Here's a link to the rvm site: https://rvm.io/

Instructions for installation are here: https://rvm.io/rvm/install/

Also, I've found installing supporting libraries using brew to generally give better results.

Here's a pointer to a set of scripts maintained by Thoughtbot (a leading Rails consulting group) for setting up a new Mac with everything required for running Rails.

https://github.com/thoughtbot/laptop/blob/master/mac

Follow the steps there (at least those that apply) and you should have good luck.

Upvotes: 1

Related Questions