**I know this is a popular issue here, but I just can't seem to get it to run. I've tried just about everything I've read, and the issue persist.
I'm using RVM and 1.9.2. I'm also using MySQL 5.5, and I've reinstalled it several times. My installation of Ruby seems to work well with SQLite, but it chokes on MySQL. I've checked to see if MySQL is working through PHP too, so I know that's not the issue. Rails just can't seem to find the "libmysqlclient.18.dylib" file.
Here's what happens when I run the server:**
littleMac$ sudo rails s
/Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /Users/littleMac in PATH, mode 040777
/Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /Users/littleMac in PATH, mode 040777
/Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.11/lib/mysql2.rb:9:in `require': dlopen(/Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.11/lib/mysql2.rb:9:in `<top (required)>'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `block in require'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'
from /Users/littleMac/sites/TestBox2/config/application.rb:7:in `<top (required)>'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/commands.rb:28:in `require'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/commands.rb:28:in `block in <top (required)>'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/commands.rb:27:in `tap'
from /Users/littleMac/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
If you are using RVM chances are you don't want to sudo.
Please also format your code in a code block to make it easier for people to help.
Read this post. It seems to be identical.
Related
I am trying to come back to create another application on Rail4 and When I try to start the application this is what happened:
prompt$ rails server
/Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/mysql2-0.4.5/lib/mysql2.rb:31:in `require': dlopen(/Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/mysql2-0.4.5/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Users/edwincaro/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/mysql2-0.4.5/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/edwincaro/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/mysql2-0.4.5/lib/mysql2/mysql2.bundle
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/mysql2-0.4.5/lib/mysql2.rb:31:in `<top (required)>'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
from /Users/ec/Sites/ticketsys/config/application.rb:7:in `<top (required)>'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /Users/ec/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/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>'
prompt$
I read all the 'Rails Server Error' posted previously here and tried most of the solution offered here but none of them worked for me.
I am thinking that maybe is the file dlopen what I am missing.
I will appreciate any help please
You need to reinstall your mysql library. Then:
gem uninstall mysql2
bundle install
To rebuild the gem against the new mysql library
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.
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.
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
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.