Rails server start error Ubuntu - ruby-on-rails

I have a fresh Ubuntu install with ruby -v 1.9.2, rails -v 3.1.1, gem -v 1.8.10, rvm -v 1.9.0 ... & whenever I try to start a server on a hello world application I get this list of errors
/home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require': no such file to load -- openssl (LoadError)
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/session/cookie.rb:1:in `<top (required)>'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/middleware/session/cookie_store.rb:4:in `<top (required)>'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/configuration.rb:131:in `const_get'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/configuration.rb:131:in `session_store'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:172:in `block in default_middleware_stack'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:146:in `tap'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:146:in `default_middleware_stack'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/engine.rb:446:in `app'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/zyad/Desktop/rails_projects/firs_app2/config/environment.rb:5:in `<top (required)>'
from /home/zyad/Desktop/rails_projects/firs_app2/config.ru:4:in `require'
from /home/zyad/Desktop/rails_projects/firs_app2/config.ru:4:in `block in <main>'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:51:in `instance_eval'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:51:in `initialize'
from /home/zyad/Desktop/rails_projects/firs_app2/config.ru:1:in `new'
from /home/zyad/Desktop/rails_projects/firs_app2/config.ru:1:in `<main>'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:40:in `eval'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:40:in `parse_file'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/server.rb:200:in `app'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands/server.rb:46:in `app'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/server.rb:301:in `wrapped_app'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/server.rb:252:in `start'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands/server.rb:70:in `start'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:54:in `block in <top (required)>'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:49:in `tap'
from /home/zyad/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any idea how to fix that? Thanks in advance !!

from the RVM guide:
$ rvm pkg install openssl
$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-openssl-dir=$rvm_path/usr

Related

Creating new Rails project on Ubuntu returning error

I am currently new to the Linux OS (Ubuntu). I was once learning to develop Rails application on Windows but I found out that it is better to develop Rails applications on Linux since there are some limitations on Windows. I dual booted my computer so I can have Linux and Windows at the same time.
So I installed Ruby and Rails using the RVM (I followed this setup: https://www.youtube.com/watch?v=hiPQynmnsiI) and I created a test project named web and placed it on my desktop. There were no errors prior to the creation of the project but when I ran the command rails s it returned the following:
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler /runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/home/arjay/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.3/lib/uglifier.rb:5:in `require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.3/lib/uglifier.rb:5:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
/home/arjay/Desktop/web/config/application.rb:7:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
/home/arjay/Desktop/web/bin/rails:9:in `require'
/home/arjay/Desktop/web/bin/rails:9:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `load'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `call'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/command.rb:7:in `call'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client.rb:30:in `run'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/bin/spring:49:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `load'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `<top (required)>'
/home/arjay/Desktop/web/bin/spring:14:in `require'
/home/arjay/Desktop/web/bin/spring:14:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Bundler Error Backtrace:
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from /home/arjay/Desktop/web/config/application.rb:7:in `<top (required)>'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /home/arjay/Desktop/web/bin/rails:9:in `require'
from /home/arjay/Desktop/web/bin/rails:9:in `<top (required)>'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `load'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `call'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/command.rb:7:in `call'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client.rb:30:in `run'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/bin/spring:49:in `<top (required)>'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `load'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `<top (required)>'
from /home/arjay/Desktop/web/bin/spring:14:in `require'
from /home/arjay/Desktop/web/bin/spring:14:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Thank you for anyone who can help me out!
Could not find a JavaScript runtime.
You need javascript runtime.
Solution 1: Run the following command install nodejs
sudo apt-get install nodejs
Solution 2: Add therubyracer gem in your Gemfile
gem 'therubyracer'
This will solve the issue
You should run
sudo apt-get install nodejs
For Reference follow url
click here

Shows error when run 'rails g rails_admin:install' command

I was trying to install rails_admin gem in my rails app.I followed this document. But when I run the command rails g rails_admin:install it shows the following error.
Running via Spring preloader in process 51535
? Where do you want to mount rails_admin? Press <enter> for [admin] > /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/line_editor/readline.rb:20:in `readline': Input/output error - read (Errno::EIO)
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/line_editor/readline.rb:20:in `readline'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/line_editor.rb:7:in `readline'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/shell/basic.rb:395:in `ask_simply'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/shell/basic.rb:68:in `ask'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/shell.rb:59:in `ask'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/rails_admin-0.8.1/lib/generators/rails_admin/utils.rb:13:in `ask_for'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/rails_admin-0.8.1/lib/generators/rails_admin/install_generator.rb:13:in `install'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/generators.rb:157:in `invoke'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/generate.rb:13:in `<top (required)>'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:130:in `generate_or_destroy'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:50:in `generate'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/home/Neethu/Projects/Rails/Personal/SampleRailsAdmin/bin/rails:9:in `<top (required)>'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/home/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/home/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
I am using gemset with Ruby version 2.2.3 and Rails version 4.2.5.
Please suggest some solution.Thanks in advance
After restarting the system it got worked !!!

rails server not starting after switching form version 4 to version 3

I am using rails version 3.2.6 and i recently downgraded from 4.0 because i wanted to work on a 3 version environment because the tutorial im following they are using version 3.
I am on a windows 7 machine and this is what i have done so far.
i first did gem install rails -v 3.2.6
then i did gem uninstall rails, and chose the version i wanted to install.
i then downgraded the gem that were dependent on rails version 4 and i was not getting any errors when running bundle install.
now when i try to do rails s to see what broke on my page the server never starts and i get a bunch of file names:
=> Booting WEBrick
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/dynamic_matchers.rb:50:in `method_missing'C:/Ruby200- x64/lib/ruby/gems/2.0.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: already initialized constant ActiveRecord::Base::OrmAdapter
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: previous definition of OrmAdapter was here
: undefined method `migration_error=' for #<Class:0x000000053c7850> (NoMethodError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:66:in `block (3 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:65:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:65:in `block (2 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/base.rb:721:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/devise-3.2.4/lib/devise/orm/active_record.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Users/Beans/Desktop/TestMaker/config/initializers/devise.rb:22:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/devise-3.2.4/lib/devise.rb:288:in `setup'
from C:/Users/Beans/Desktop/TestMaker/config/initializers/devise.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `block in load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:587:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:587:in `block in <class:Engine>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Users/Beans/Desktop/TestMaker/config/environment.rb:5:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Users/Beans/Desktop/TestMaker/config.ru:3:in `block in <main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from C:/Users/Beans/Desktop/TestMaker/config.ru:in `new'
from C:/Users/Beans/Desktop/TestMaker/config.ru:in `<main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands/server.rb:46:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands/server.rb:70:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:55:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
i know this might be a bunch of garbage to some, but if someone could help me that would be awesome. if you need more information, please let me know.
thank you in advance.
Since i am using rails on windows, RVM does not work, so i used the pik gem and with that i changed my environment to 3.2.6 and then it worked fine.

Rail server crash on RHEL 6

I'm first timer to Ruby on Rails, trying to set it up on RHEL 6. Since the package manager had very older version of Ruby. I compiled from source with Ruby 1.9.3 and installed rails using
$gem install rails
Created a new app using
$rails new /path/to/newapp
but now when I try to run
$rails server
it crashes with given log
=> Booting WEBrick
=> Rails 3.2.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- openssl (LoadError)
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/session/cookie.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/session/cookie_store.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/configuration.rb:140:in `const_get'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/configuration.rb:140:in `session_store'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:268:in `block in default_middleware_stack'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:232:in `tap'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:232:in `default_middleware_stack'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:469:in `app'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/anurag/rubyapp/config/environment.rb:5:in `<top (required)>'
from /home/anurag/rubyapp/config.ru:4:in `require'
from /home/anurag/rubyapp/config.ru:4:in `block in <main>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /home/anurag/rubyapp/config.ru:1:in `new'
from /home/anurag/rubyapp/config.ru:1:in `<main>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I've tried to search about this error but did not find a working solution.
Apart from this I'd like to point me to some useful resource which explains best practices in Ruby on Rails.
-
I fixed the problem.
I went inside extracted source directory of Ruby then run these.
$cd /ext/openssl/
$ruby extconf.rb
$make
$make install
I hope other will get some help from this. :-)
Your ruby is not compiled with SSL support. Try using rvm:
https://rvm.io
https://rvm.io/packages/openssl/

No Such File to Load -- rest_client (Rails 3)

When I do thin start, this is the error I get:
$ thin start
>> Using rack adapter
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require': no such file to load -- rest_client (LoadError)
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require'
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /.rvm/gems/ruby-1.9.2-p0/gems/stripe-1.5.13/lib/stripe.rb:9:in `<top (required)>'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `block in require'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler.rb:112:in `require'
from /app/config/application.rb:7:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /app/config/environment.rb:2:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /app/config.ru:3:in `block in <main>'
from /.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
from /.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
from /app/config.ru:1:in `new'
from /app/config.ru:1:in `<main>'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `eval'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `load'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:45:in `for'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/controllers/controller.rb:169:in `load_adapter'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/controllers/controller.rb:73:in `start'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/bin/thin:6:in `<top (required)>'
from /.rvm/gems/ruby-1.9.2-p0/bin/thin:19:in `load'
from /.rvm/gems/ruby-1.9.2-p0/bin/thin:19:in `<main>'
Anyone have any thoughts?
Edit: I tried running sudo gem install rest-client, and even though that gem installed, I am still getting the error when I run thin start.
I had to declare gem 'rest-client' explicitly in my Gemfile for it to work.
It was an issue with the Stripe gem, that needs rest-client as a dependency.

Resources