Reputation: 273
I'm trying to get Rails going for the first time and connected to MySQL, all on my local machine. As far as I can tell, Rails is installed according to spec. My setup is:
When I run the command rails s
, I receive the following error:
C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in 'require': 193: %1 is not a valid Win32 application - C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError)
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/
lib/mysql2/mysql2.rb:2:in '<top (required)>'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/
lib/mysql2.rb:9:in 'require'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/
lib/mysql2.rb:9:in '<top (required)>'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/
runtime.rb:68:in 'require'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/
runtime.rb:68:in 'block (2 levels) in require'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/
runtime.rb:66:in 'each'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/
runtime.rb:66:in 'block in require'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/
runtime.rb:55:in 'each'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/
runtime.rb:55:in 'require'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler.
rb:128:in 'require'
from C:/Users/Andrew/Desktop/rails_test/simple_cms/config/application.rb
:7:in '<top (required)>'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/c
ommands.rb:53:in 'require'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/c
ommands.rb:53:in 'block in <top (required)>'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/c
ommands.rb:50:in 'tap'
from C:/wamp/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/c
ommands.rb:50:in '<top (required)>'
from script/rails:6:in 'require'
from script/rails:6:in '<main>'
So there seems to be a problem with the mysql2
gem? My reading has shown me that ~1-2 years ago it was a big issue, but I was of the understanding that the problems with it had been resolved at this point. (And if it is indeed better than mysql
, then I'd like to use it!)
rails s
from working, so I closed everything and tried again. Nothing.If any further information is needed, please let me know! I've been Googling this problem for a large part of the past 48 hours to absolutely no avail. Any direction would be appreciated. :) Thanks!
Upvotes: 2
Views: 839
Reputation: 273
OP here. I just got Rails working. Unfortunately not to spec (I'm using SQLlite instead of the MySQL installation installed via WAMP), but it's functioning. I used the RailsInstaller and set it up according to their instructions, and it works brilliantly. I recommend it to anybody who's having the same problem I was!
Upvotes: 1