I decided to try getting ruby on rails running on my new laptop, as I’ve tried to get it running several times on less reliable hardware, to various degrees of error.
I have ruby 1.9.2 p320 installed via RVM and Rails 3. Here’s the output for rails new blog:
...
run bundle install
/home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/https.rb:92:in `<top (required)>'
from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:447:in `ssl'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:216:in `connection_for'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:358:in `request'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:149:in `fetch'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:177:in `fetch_dependency_remote_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:135:in `fetch_remote_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:73:in `specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:234:in `block in remote_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `each'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `remote_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:165:in `fetch_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:70:in `specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:191:in `block (2 levels) in index'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `each'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `block in index'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/index.rb:9:in `build'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:184:in `index'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:178:in `resolve'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/bin/bundle:14:in `block in <main>'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/bin/bundle:14:in `<main>'
Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
and for rake db:create:
Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
and, finally, from bundle install:
Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/https.rb:92:in `<top (required)>'
from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:447:in `ssl'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:216:in `connection_for'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:358:in `request'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:149:in `fetch'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:177:in `fetch_dependency_remote_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:135:in `fetch_remote_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:73:in `specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:234:in `block in remote_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `each'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `remote_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:165:in `fetch_specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:70:in `specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:191:in `block (2 levels) in index'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `each'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `block in index'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/index.rb:9:in `build'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:184:in `index'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:178:in `resolve'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/bin/bundle:14:in `block in <top (required)>'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/bin/bundle:14:in `<top (required)>'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/bin/bundle:23:in `load'
from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/bin/bundle:23:in `<main>'
I’m obviously not very experienced with Rails so I don’t have a clue what’s going on. This isn’t the first time I couldn’t get it running by any means.
EDIT: Here’s my Gemfile, it’s just a default:
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
It looks like openSSL (at least the dev library) isn’t installed.
rvm pkg install openssl
rvm pkg install iconv
rvm remove 1.9.2
rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr
Alternatively, you can
sudo apt-get install libssl-devand reinstall rvm.For more info see: https://rvm.io/packages/openssl/ & Rails 3 – no such file to load — openssl