javascript runtime error with `rails s` command on remote server - ruby-on-rails

I just set up a VPS to prepare for launching a Rails app and, on the actual remote server, I created a new rails project to test things out, only doing rails new blog -d postgresql. I then tried to start the server using the rails s command and got the error below.
.rvm/gems/ruby-1.9.3-p429#anwalt/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /home/michael/.rvm/gems/ruby-1.9.3-p429#anwalt/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#anwalt/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#anwalt/gems/uglifier-2.1.1/lib/uglifier.rb:3:in `require'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#anwalt/gems/uglifier-2.1.1/lib/uglifier.rb:3:in `<top (required)>'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/michael/blogy/config/application.rb:7:in `<top (required)>'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#anwalt/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#anwalt/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in <top (required)>'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#anwalt/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
from /home/michael/.rvm/gems/ruby-1.9.3-p429#anwalt/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I installed $ gem install execjs but still get the same error (I think I have to require it somewhere). Anyways, my question is, why wouldn't the rails s command work on a VPS out of the box the way that it works on a local machine, and, if not using rails s command how am I supposed to start the application once I do launch my real app (rather than this dummy app).

Try to install node.js via apt-get install nodejs or sudo apt-get install nodejs if you are using debian\ubuntu.

Related

Repairing Rails and Server and on Nitrous.io

I was doing One Month Rails's tutorial on Nitrous.io. At one point, some weird files appeared on my tree, and I deleted them. Everything stopped working.
I ran:
$ git add .
$ git checkout -f
and restored the tree.
BUT, when I ran:
$ rails server
I get:
action#first-project-48185:~/pinteresting$ rails server
-bash: rails: command not found
I also tried:
$ ruby -v #and got an older version, so I reinstalled it
$ rails -v
action#first-project-48185:~/pinteresting$ rails -v
-bash: rails: command not found
When I run:
$ ruby -v #on MAC terminal, I get the correct version
$ rails -v #on MAC terminal, I get the correct version
Interestingly, when I run:
$ rails server or $ rails server -p 4000
I get:
Franciscos-MacBook-Pro:pinteresting franciscomello$ rails server
/Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
and a bunch of other text below:
from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:2:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/franciscomello/Desktop/pinteresting/config/application.rb:7:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Franciscos-MacBook-Pro:pinteresting franciscomello$ rails server -p 4000
/Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:2:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/franciscomello/Desktop/pinteresting/config/application.rb:7:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
What's frustrating is I was on my largest streak without any errors or bugs :(
Any ideas?
I can't tell why Rails is no longer working from those errors, but I would recommend reinstalling rails. Run the following command to reinstall Rails:
gem install rails
From here you should be able to run rails server.
You could also run bundle install within the project directory if your Gemfile includes other gems which need to be installed.

can't run rails server (activesupport error)

in my application, in the last few days, i'm unable to run the rails server/rails s or even bundle exec rails server command any more.
it was running like a charm before.
i tried to revert the changes using git, but no luck, i tried all the possible proprieties i could think of.
i use rubymine, but same problem when using the Terminal .
when i run:
ma#SL510:~/ts$ rails server
i get the following error stack trace :
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392#global/gems/unicorn-4.6.2/lib/unicorn/http_request.rb:4:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392#global/gems/unicorn-4.6.2/lib/unicorn.rb:103:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
from /home/ma/ts/config/application.rb:16:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
i don't know how could i fix this, to get the rails server command to run again !
any help would be appreciate it !
ps: please tell me if i need to provide more info. Thanks.
Thanks to Jef
creating a new gemset and using it
and after this:
gem install unicorn
fixed the problem with that command :)
You may try to create a brand new gemset (and use it), then bundle install so that Bundler install gems listed in your Gemfile. The stacktrace seems to indicate you're using the global gemset, which is a really bad idea.

Some thing about JS error in starting a Ruby Server on Win7

UPDATE +2 hrs:
I rebooted, uninstalled, and then installed a new copy of the downloaded Railsinstaller program.
Pulled the gem marble down, and installed it. Said it installed correctly. (However, I think I read at some places that just gem name is sufficient and gem install name is redundant.)
Started the server - same problem. Runtime JS doesn't exist.
So I created a new app. Build went through clean. Installed the execjs again. (Installed correctly). The ran 'rails s' and the same exact problem persists.
Solution not found.
I'm an absolute newbie. Sequence of steps:
Installed Ruby the traditional way. Download from Ruby website, install, try to make it work. Something went wrong - the BUNDLE INSTALL said it couldn't find a gem file.
I said no problem - let's search for answers...
I installed Railsinstaller as the full package. Installation went well. I even created a new dummy app called 'my_app'.
Yay...
Then I navigated to the directory with the app and punched 'rails s' on the command prompt (Which by the way is being run as administrator)
The server started (WEBrick).
I go to localhost:3000 and nothing shows.
I go to prompt and do gem install rails
It goes and fetches some gems and does some more work
Now when I start the server - it throws some error about Javascript.
Here's the error:
C:\Sites\my_app>rails s
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.3.0/lib/execjs/run
times.rb:50:in `autodetect': Could not find a JavaScript runtime. See https://gi
thub.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUn
available)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.3.0/l
ib/execjs.rb:5:in `<module:ExecJS>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.3.0/l
ib/execjs.rb:4:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-script-
2.2.0/lib/coffee_script.rb:1:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-script-
2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-script-
2.2.0/lib/coffee-script.rb:1:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-script-
2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-rails-3
.2.2/lib/coffee-rails.rb:1:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-rails-3
.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/runtime.rb:68:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/runtime.rb:66:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/runtime.rb:66:in `block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/runtime.rb:55:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/runtime.rb:55:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler.rb:122:in `require'
from C:/Sites/my_app/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/commands.rb:53:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/commands.rb:53:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/commands.rb:50:in `tap'
from C:/RailsInstaller/Ruby1.9.3/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>'
C:\Sites\my_app>
I have no idea what to do next. Please help...
My Hosts file was filled with some validator crap. Cleaned that out and the server is working now.

problem on setting up ruby on rails

I just started learning ruby on rails with "Lynda Ruby on Rails 3 Essential Training".
I finished the installation, and created rails application by writing- "rails new app".
After that when I wrote - "rails server", that's what I saw:
C:\Users\Oded\sites\simple_cms>rails server
C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.r
b:2:in `require': 193: %1 is not a valid Win32 application. - C:/Ruby192/lib/r
uby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError
)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2.rb:7:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2.rb:7:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:64:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:64:in `block (2 levels) in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:62:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:62:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:51:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:51:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler.rb:11
2:in `require'
from C:/Users/Oded/sites/simple_cms/config/application.rb:7:in `<top (re
quired)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:28:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:28:in `block in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:27:in `tap'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Can you please help me find the solution?
Happy holidays,
Oded
Looks like you're missing some gems! try running bundle install... then all should work.
EDIT: make sure that your Gemfile contains the line
gem 'mysql'
before running bundle install. Bundler will get you set up for mysql, dependencies and all.
You have to go to this website and follow the directions ...
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
or in short download the connector mentioned in the article from mysql or a mirror site
Run this command:
gem install mysql --platform=ruby -- --with-mysql-dir=C:/mysql-connector-c-noinstall-6.0.2-win32
Make sure you have the correct path to the mysql connector folder that has no spaces!!
After that is complete make sure you copy the libmysql.dll file from the connector library you unzipped and downloaded and placed that in the Ruby\bin file.
After that delete the connector libary and start it up by typing 'rails server' making sure your gem file has the line gem 'mysql' or gem 'mysql2' I'm not sure which one so try both. It sucks and they really need to fix this for windows.

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