Unable to start rails server with -d switch - ruby-on-rails

I am trying to start rails server as a daemon using the -d switch. I have installed thin server and working on Ubuntu. If it is started as a normal process, it works, but when using the -d switch, it complains of a server pid file /tmp/pids/server.pid
Even if I delete the file and try to start the server with -d switch, it won't start. Please help.
The error says:
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup': You have already activated daemons 1.1.9, but your Gemfile requires daemons 1.1.8. Using bundle exec may solve this. (Gem::LoadError)
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require'
from /home/ubuntu/deploys/releases/20131001113746/config/boot.rb:6:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/ubuntu/deploys/releases/20131001113746/config/application.rb:1:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/ubuntu/deploys/releases/20131001113746/config/environment.rb:2:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/ubuntu/deploys/releases/20131001113746/config.ru:3:in `block in <main>'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /home/ubuntu/deploys/releases/20131001113746/config.ru:1:in `new'
from /home/ubuntu/deploys/releases/20131001113746/config.ru:1:in `<main>'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:42:in `for'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:169:in `load_adapter'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:73:in `start'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
from /usr/bin/thin:23:in `load'
from /usr/bin/thin:23:in `<main>'

run the server using 'bundle exec' in the start like:
bundle exec rails s -d
Alternatively, your exception trace is stating a mismatch for the activated daemons gem. To fix this, set the version of daemons gem to be greater than (instead of equal to) 1.1.8 and try.

Related

Cannot start rails server, I get an error

I'm new to Ruby on Rails. So, I'd got this error before, and I reinstalled rails and ruby and installed them again, but I still get it.
The error is:
/home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/X/Documents/Appw/config/application.rb:7:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /home/X/Documents/Appw/bin/rails:9:in `require'
from /home/X/Documents/Appw/bin/rails:9:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/rails.rb:28:in `load'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/rails.rb:28:in `call'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/command.rb:7:in `call'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client.rb:28:in `run'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/bin/spring:51:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/binstub.rb:11:in `load'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/X/Documents/Appw/bin/spring:13:in `require'
from /home/X/Documents/Appw/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I tried updating the uglifier gem, but nothing happened.
It looks like you have't installed nodejs
sudo apt-get install nodejs
Should work !!!
The problem was that I didn't have nodejs installed. After I've installed it, everything worked smoothly.
What is you gemfile/gem list?
Actually having meteor installed doesn't count as having nodejs installed. nodejs is required for uglifier package, so simple: yum install nodejs resolves the issue.

Why does Rails give "`require': cannot load such file -- singleton" only on production server?

I'm trying to convert a Rails 4.0 project from PostgreSQL to MySQL.
I have everything working in my local Vagrant VM, but after I do cap deploy, this is what I see in the logs on the production server:
I, [2015-03-25T15:39:12.558662 #28566] INFO -- : Refreshing Gem list
[snip]/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.13/lib/active_support/deprecation.rb:1:in `require': cannot load such file -- singleton (LoadError)
from [snip]/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.13/lib/active_support/deprecation.rb:1:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/configuration.rb:1:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/configuration.rb:1:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/railtie.rb:2:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/railtie.rb:2:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/engine.rb:1:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/engine.rb:1:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/application.rb:4:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/application.rb:4:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails.rb:9:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails.rb:9:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/all.rb:1:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/all.rb:1:in `<top (required)>'
from [snip]/releases/20150325221423/config/application.rb:3:in `require'
from [snip]/releases/20150325221423/config/application.rb:3:in `<top (required)>'
from [snip]/releases/20150325221423/config/environment.rb:2:in `require'
from [snip]/releases/20150325221423/config/environment.rb:2:in `<top (required)>'
from config.ru:4:in `require'
from config.ru:4:in `block in <main>'
from [snip]/shared/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from [snip]/shared/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `build_app!'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:628:in `init_worker_process'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:651:in `worker_loop'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:536:in `maintain_worker_count'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:294:in `join'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `load'
from [snip]/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'
E, [2015-03-25T15:39:12.723362 #1450] ERROR -- : reaped #<Process::Status: pid 28563 exit 1> worker=0
But my understanding is that singleton is a Ruby feature, not some third-party library that I might be missing. Is that correct? What is the problem here?
Edit: I am in the process of adding Chef to this project. I have set up a second Vagrant VM to test the production config on before I apply it to the actual production server. I have configured this VM to match the production server, as close as I can tell, but the VM works fine.
I finished adding Chef to the project and now use it to configure the production server. Around the same time I also upgraded to Rails 4.2.
I'm no longer getting this error, so it is likely one of those two things that fixed the problem.

Ruby on Rails: Code Rot

Long story short, I start up my system, and when I tell Rubymine to run development I get this.
/home/barnabus/.rvm/rubies/ruby-1.9.3-p385/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/barnabus/Projects/Ruby/houston/script/rails server -b 0.0.0.0 -p 3000 -e development
/home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/metal/mime_responds.rb:9:in `<module:MimeResponds>': /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:10: syntax error, unexpected tINTEGER, expecting keyword_end (SyntaxError)
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/metal/mime_responds.rb:6:in `<module:ActionController>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/metal/mime_responds.rb:5:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/base.rb:196:in `<class:Base>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/base.rb:171:in `<module:ActionController>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.8/lib/action_controller/base.rb:3:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/cancan-1.6.10/lib/cancan/controller_additions.rb:394:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/cancan-1.6.10/lib/cancan.rb:4:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:68:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:66:in `each'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:66:in `block in require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:55:in `each'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:55:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler.rb:128:in `require'
from /home/barnabus/Projects/Ruby/houston/config/application.rb:7:in `<top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.8/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from /home/barnabus/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from /home/barnabus/Projects/Ruby/houston/script/rails:6:in `require'
from /home/barnabus/Projects/Ruby/houston/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
I have never seen this error, and I don't really know where and how to proceed as so much of this is happening in framework code.
Any help is greatly appreciated.
The trick was to see that it is a gem that is acting up. So I went and uninstalled the gem by running this.
bundle exec gem uninstall actionpack
It complained about dependencies.
You have requested to uninstall the gem:
actionpack-3.2.8
actionmailer-3.2.8 depends on [actionpack (= 3.2.8)]
railties-3.2.8 depends on [actionpack (= 3.2.8)]
rails-3.2.8 depends on [actionpack (= 3.2.8)]
rspec-rails-2.12.2 depends on [actionpack (>= 3.0)]
simple_form-2.0.4 depends on [actionpack (~> 3.0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] Y
But that doesn't matter because we are going to reinstall it.
Successfully uninstalled actionpack-3.2.8
ERROR: While executing gem ... (NoMethodError)
undefined method `delete' for #<Bundler::SpecSet:0x00000002c53b20>
After that was done I had to reinstall it and to do that I just ran
bundle install
And I was back on track.

rspec-rails 2.11.1 + rails 3.2.6

I'm using rspec-rails 2.11.0 in my app, but when I execute rspec spec/ something wrong happens. This is stack of error:
/Users/diego/.rvm/gems/ruby-1.9.3-head#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:31:in `block in setup': You have already activated rspec-core 2.10.1, but your Gemfile requires rspec-core 2.11.1. Using bundle exec may solve this. (Gem::LoadError)
from /Users/diego/.rvm/gems/ruby-1.9.3-head#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:17:in `setup'
from /Users/diego/.rvm/gems/ruby-1.9.3-head#global/gems/bundler-1.1.4/lib/bundler.rb:107:in `setup'
from /Users/diego/.rvm/gems/ruby-1.9.3-head#global/gems/bundler-1.1.4/lib/bundler/setup.rb:7:in `<top (required)>'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /Users/diego/Development/Rails/carros/carros-web/config/boot.rb:6:in `<top (required)>'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/diego/Development/Rails/carros/carros-web/config/application.rb:1:in `<top (required)>'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/diego/Development/Rails/carros/carros-web/config/environment.rb:2:in `<top (required)>'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/diego/Development/Rails/carros/carros-web/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/diego/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/diego/Development/Rails/carros/carros-web/spec/models/admin_spec.rb:1:in `<top (required)>'
from /Users/diego/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load'
from /Users/diego/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `block in load_spec_files'
from /Users/diego/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `map'
from /Users/diego/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load_spec_files'
from /Users/diego/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/diego/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/diego/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in `block in autorun'
What's is wrong? This is my gem file https://gist.github.com/3280825
What's happening is that your rspec app version is different from the one you have in global env.
And it seems when you execute rspec the one from global is being used.
The way to make it work is to use bundle exec as said from #prusswan wich will execute that command with the app env (with proper gems versions etc..)
Also the error message mentions to try bundle exec
Since bundler is used, although the error message says to "try" bundle exec, you really have to run it with bundle exec if you want to ensure that only the gem versions specified in Gemfile/Gemfile.lock are used. The other alternative would be to use binstubs as explained here.

RubyMine 3.0 setup on Windows 7

All,
I downloaded/installed 1.9.2 windows installer, and then RubyMine3.0RC, and installed it.
Opening a new Rails project, with mysql selected as the DB, gives the following error when I "RUN" it.
D:\ProgramFiles\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Users/Rob/RubymineProjects/test1/script/rails server -p 3000 -b 127.0.0.1 -e development
D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': 126: The specified module could not be found. - D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError)
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2.rb:7:in `require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2.rb:7:in `<top (required)>'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `block in require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler.rb:112:in `require'
from C:/Users/Rob/RubymineProjects/test1/config/application.rb:7:in `<top (required)>'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:28:in `require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:28:in `block in <top (required)>'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:27:in `tap'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:27:in `<top (required)>'
from C:/Users/Rob/RubymineProjects/test1/script/rails:6:in `require'
from C:/Users/Rob/RubymineProjects/test1/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
Is this supposed to happen? I have installed the mysql2 gem as well, but still seeing these messages in the console.
Thanks for any help!
Make sure you have libmysql.dll from the 5.1.x 32-bit MySQL distribution in PATH or in RUBY_HOME\bin directory.
If it doesn't help, you may have better luck reporting the issue at the mysql2 gem project homepage.
Thanks, I was able to fix the error by copying "libmySQL.dll" file from 'C:\Program Files\MySQL\MySQL Server 5.1\bin' to 'C:\Ruby192\bin'.
For details, refer to post - http://rorguide.blogspot.com/2011/03/getting-error-specified-module-could.html

Resources