Evergreen load errors - ruby-on-rails

I have a Rails 5 app and just added the following line to my Gemfile:
gem 'evergreen', require: 'evergreen/rails'
After that I run:
bundle
rake
And get the following issues:
Issue #1
Relevant output:
rake aborted!
LoadError: cannot load such file -- rack/showexceptions
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/sinatra-1.0/lib/sinatra/showexceptions.rb:1:in `<top (required)>'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/sinatra-1.0/lib/sinatra/base.rb:6:in `<top (required)>'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/evergreen-0.3.0/lib/evergreen.rb:2:in `<top (required)>'
I've 'fixed' this by using sinatra's master branch (currently at 2.0.0.beta2)
gem 'sinatra', git: 'https://github.com/sinatra/sinatra.git'
Issue #2:
Relevant output:
rake aborted!
LoadError: cannot load such file -- capybara/wait_until
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/Users/veronicarebagliatte/.rvm/gems/ruby-2.3.1#ticketing_system/gems/evergreen-0.3.0/lib/evergreen.rb:4:in `<top (required)>'
Thing is wait_until has been removed from capybara.
Please note I'm not proceeding with evergreen actual usage just yet, all I want is to install it successfully for now. In other words, I want to be able to run rake without getting any errors.
Has someone else experienced the same issues? Is there anything I'm missing or should I just fork the gem and try to fix them?

From your error log you can see that you're project is using evergreen v0.3.0 (because its sinatra restriction was the last one that would allow 2+), whereas the current version of evergreen is v1.2.0 - You need to lock your version of evergreen in your Gemfile to >=1.2.0 and then see what other dependence issues you have.
You'll have at least a dependence issue with sinatra since the 1.2.0 version of evergreen requires sinatra ~> 1.1 whereas the current master branch allows >= 1.1. To use the master branch of evergreen in your project specify
gem 'evergreen', github: 'abepetrillo/evergreen', require: 'evergreen/rails'
in your Gemfile

Yes wait_until has removed with capybara2.0 check this updates. You should remove require "capybara/wait_until" for success.

Related

Incompatible library versions ruby, rvm, bundler

I am having troubles with Ruby using rvm. First I thought problem was with specific gem pg. But now I was able to reproduce error using mysql2. I have troubles to diagnose the problem...
Here is the last log.
bundle exec rake secret
rake aborted!
LoadError: incompatible library version - /home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2/mysql2.so
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2.rb:31:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/config/application.rb:7:in `<top (required)>'
/home/dominim6/ror/dapps/releases/20160315195705/Rakefile:4:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/Rakefile:4:in `<top (required)>'
Why does it search for 2.2.0 here? Why not 2.2.3? (which, by the way, is not installed under vendor)
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2.rb:31:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
Similar case, I believe, is this other question about pg. I had that trouble, that is why I tested now with mysql. I even created a bug at ruby, which was rejected because is a mix of library extensions...
Question is what is mixing libraries. My guess is rvm. Any similar cases? Any help to diagnose? I can put more info using both pg and mysql2.

ruby tutorial to launch my app

i'm just starting with an Unix based OS
i installed RVM to do the same basic tutorial like windows(dos), but i get
an error, i tried to do the same work in root/user shell but is the same
when i run rails server i get this message:
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.1/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 /usr/local/rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.1/lib/execjs.rb:5:in `<module:ExecJS>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.1/lib/execjs.rb:4:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/uglifier-2.2.1/lib/uglifier.rb:3:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/uglifier-2.2.1/lib/uglifier.rb:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/raul/blog/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /usr/local/rvm/gems/ruby-2.0.0-p247/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>'
i reviwed the gem command and dome problems was founded too. Execjs is installed several times in my machine, root->user. This is what i get with gem check:
json-1.8.0.gem has 12 problems
ext/json/ext/generator/.RUBYARCHDIR.time:
Extra file
ext/json/ext/generator/Makefile:
Extra file
ext/json/ext/generator/generator.o:
Extra file
ext/json/ext/generator/generator.so:
Extra file
ext/json/ext/generator/siteconf20130920-14093-1b8hzo9.rb:
Extra file
ext/json/ext/parser/.RUBYARCHDIR.time:
Extra file
ext/json/ext/parser/Makefile:
Extra file
ext/json/ext/parser/parser.o:
Extra file
ext/json/ext/parser/parser.so:
Extra file
ext/json/ext/parser/siteconf20130920-14093-zefm93.rb:
Extra file
lib/json/ext/generator.so:
Extra file
lib/json/ext/parser.so:
Extra file
Just add a JavaScript runtime to your Gemfile (for example, execJS): gem 'execjs'
Then, just run bundle install and it should work.
Install node
sudo apt-get install nodejs
followed by
gem install execjs
or just put gem 'execjs' in your gemfile.
EDIT: i'm editing my answer based on your edits and comments.

Library not loaded error -- wrong ruby

I'm using RVM with Ruby 1.9.3 p448, but when I try to run my rails server, I get this error (plus some other stuff)
9): Library not loaded: /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p327/lib/libruby.1.9.1.dylib (LoadError)
Referenced from: /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
Reason: image not found - /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
The weird thing is, it's referencing ruby-1.9.3-p327, which isn't even one of my RVM installs. Should I delete that Ruby folder it's not finding libruby in? Or what else might be wrong?
EDIT -- Full Error
/Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': dlopen(/Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle, 9): Library not loaded: /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p327/lib/libruby.1.9.1.dylib (LoadError)
Referenced from: /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
Reason: image not found - /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:2:in `<top (required)>'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix-spawn.rb:1:in `<top (required)>'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/albino-1.3.3/lib/albino.rb:1:in `<top (required)>'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/sashafklein/rails/<appname>/config/application.rb:12:in `<top (required)>'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/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>'
The albino gem seems to be at the bottom of this, but I think it's necessary for the app, so I can't just take it out. I tried gem uninstall albino (which gave no output) and then bundle install, but that didn't fix anything. Likewise with bundle update, and likewise with mpapis's and sahil's help below.
this kind of thing could happen when gems are linked wrong, try this:
rvm get head
rvm reinstall 1.9.3-p448
rvm use 1.9.3-p448
This will reinstall the ruby and make all gems pristine, which should prevent such problems from happening - unless gem authors did some extra tricks which go out of standard ruby detection.
Update
Using bundlers flag --deployment or --path is not always safe, the error message says:
/Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
Which means the gem was compiled with the other ruby and now can not find it.
The simplest way to fix it is to stop using --deployment flag, as it is persisted the easiest way to get rid of it (and all other potentially dangerous settings) is:
rm -rf .bundle/ vendor/bundle
bundle install
Interpretation
Bundler does great job filtering gems in runtime, unfortunately it enforces another layer of filtering with the --deployment flag, which forces installation of gems to path that is common for multiple rubies - in this case: ruby/1.9.1, this is unsafe as rubies can be compiled with different settings which can break c-extension gems used in different ruby.

Does TinyTDS support Ruby 2.0.0?

I am having real trouble trying to get TinyTDS working with Ruby 2.0.0 on Windows 7.
When i run a rails c (or require tiny_tds from an irb), i get the following:
D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- tiny_tds/tiny_tds (LoadError)
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.5.1-x86-mingw32/lib/tiny_tds.rb:16:in `rescue in <top (required)>'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.5.1-x86-mingw32/lib/tiny_tds.rb:12:in `<top (required)>'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from S:/code/user/app/ruby2_test/config/application.rb:7:in `<top (required)>'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:39:in `require'
from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:39:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I have tried installing the latest version of the gem:
gem install tiny_tds --pre
And looking inside:
D:\Ruby\Ruby200\lib\ruby\gems\2.0.0\gems\tiny_tds-0.6.0.rc1-x86-mingw32\lib\tiny_tds
I can see there is no 2.0 directory, which leads me to believe version 2.0 isn't supported. However i can see no mention on the TinyTDS github or any other sites about this issue.
So, am i missing something or does TinyTDS currently just not work with Ruby 2.0?
Copying the answer from the comments in order to remove this question from the "Unanswered" filter:
I believe this is an issue with OS that you are using as another
individual had the same issue. As stated I believe this is a
dependency issue with Windows. Please see the comment from MetaSkills
- https://github.com/rails-sqlserver/tiny_tds/issues/110#issuecomment-15503928
~ answer per David

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.

Resources