Ruby on Rails Installation process - ruby-on-rails

So first i installed the Ruby 2.2.1 x 64 version installer
from this site
http://rubyinstaller.org/downloads/
And then using the command line
gem install rails
and then i downloaded devkit and install it
DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
Then started creating rails app
rails new app -d mysql
but there's an error while starting the server
rails server
it says:
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysq
l2.rb:2:in `require': cannot load such file -- mysql2/2.2/mysql2 (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/li
b/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/li
b/mysql2.rb:31:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/li
b/mysql2.rb:31:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler.rb
:134:in `require'
from c:/Users/JOEY/readit/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
please help!

Related

Rmagick fails after Ubuntu upgrade from 16.04 to 18.04

when i start rails server, server is not started
It is showing following Error
when i start rails server, server is not started
It is showing following Error
/home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': libMagickCore-6.Q16.so.2: cannot open shared object file: No such file or directory - /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rmagick-2.15.0/lib/RMagick2.so (LoadError)
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rmagick-2.15.0/lib/rmagick_internal.rb:12:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rmagick-2.15.0/lib/rmagick.rb:1:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:81:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:81:in `block (2 levels) in require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:76:in `each'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:76:in `block in require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:65:in `each'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:65:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler.rb:114:in `require'
from /home/effectech/workspace/hotel_management/config/application.rb:7:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /home/effectech/workspace/hotel_management/bin/rails:9:in `require'
from /home/effectech/workspace/hotel_management/bin/rails:9:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /home/effectech/workspace/hotel_management/bin/spring:15:in `require'
from /home/effectech/workspace/hotel_management/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
It seems shared object changed its location after system upgrade. Try gem uninstall rmagick and then bundle install to compile it against current imagemagick version.

How to fix action_controller/metal/responder (LoadError) in Ruby on Rails

I installed the jasper-rails gem and this error showed when im starting rails server. I am using the latest version of ruby and rails on windows. How do i fix this?
c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/jasper-rails-1.0.3/lib/jasper-rails.rb:26:in `require': cannot load such file -- action_controller/metal/responder (LoadError)
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/jasper-rails-1.0.3/lib/jasper-rails.rb:26:in `<top (required)>'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `each'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `block in require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `each'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:106:in `require'
from c:/Users/cjhmonteclaro/Desktop/Execute/config/application.rb:7:in `<top (required)>'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

rails server cannot start on Windows

This question has been asked many times before but non of solution is working for me. I have added mysqllib.dll file in ruby/bin, installed mysql2 version 0.3.18 and installed bundle but still getting same error.
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `require': cannot load such file -- mysql2/2.2/mysql2 (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler.rb:134:in `require'
from C:/Users/Brendon/Sites/quote/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
you can specify the path for mysql2 lib in Gemfile
gem "mysql2", :path => "/MyPath/MyGem.gem"

MySQL error in Ruby on Rails

Install ruby and ruby on rails on my windows 8.1
I have a problem when launching the server
C:\Sites\testing>rails s
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `require': cannot load such file -- mysql2/2.2/mysql2 (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler.rb:134:in `require'
from C:/Sites/testing/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
C:\Sites\testing>
Help me please.
Thank.
I came across this post where it seems that someone is having a similar issues to yours. Looks like some have suggested trying RubyInstaller.

Trouble starting Rails server

I am a newbie in Ruby. I have installed ruby and gems in in windows system but unable to start rails server. I have attached the screen shot and the below the error i am getting. Need help to sort this out.
c:\ror\dev\draft_app>rails s
c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/lib/sqlite3.rb
:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/l
ib/sqlite3.rb:6:in `rescue in <top (required)>'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/l
ib/sqlite3.rb:2:in `<top (required)>'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:76:in `require'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:76:in `block (2 levels) in require'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:72:in `each'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:72:in `block in require'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:61:in `each'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/ru
ntime.rb:61:in `require'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler.rb
:134:in `require'
from c:/ror/dev/draft_app/config/application.rb:7:in `<top (required)>'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:78:in `require'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:78:in `block in server'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:75:in `tap'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:75:in `server'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:39:in `run_command!'
from c:/ror/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Thanks in advance

Resources