Forum: Ruby on Rails I cannot cannot connec the mysql2 gem

3a4e1fa2e1970b38a0d4ff60f2a6ee30?d=identicon&s=25 Harish Vishnu (Guest)
on 2013-08-12 08:01
(Received via mailing list)
rails s
/usr/local/share/gems/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `require':
cannot load such file -- mysql2/mysql2 (LoadError)
    from /usr/local/share/gems/gems/mysql2-0.3.13/lib/mysql2.rb:8:in
`<top
(required)>'
    from
/usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in
`require'
    from
/usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in
`block (2 levels) in require'
    from
/usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in
`each'
    from
/usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in
`block in require'
    from
/usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in
`each'
    from
/usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in
`require'
    from /usr/local/share/gems/gems/bundler-1.3.5/lib/bundler.rb:132:in
`require'
    from /home/Harish/Documents/simple_cms/config/application.rb:7:in
`<top
(required)>'
    from
/usr/local/share/gems/gems/railties-4.0.0/lib/rails/commands.rb:76:in
`require'
    from
/usr/local/share/gems/gems/railties-4.0.0/lib/rails/commands.rb:76:in
`block in <top (required)>'
    from
/usr/local/share/gems/gems/railties-4.0.0/lib/rails/commands.rb:73:in
`tap'
    from
/usr/local/share/gems/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>'
Ce5e201eca55d4f79d0ead9acc91d544?d=identicon&s=25 Dheeraj Kumar (Guest)
on 2013-08-12 08:44
(Received via mailing list)
Have you installed mysql libraries?

--
Dheeraj Kumar
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2013-08-12 09:44
(Received via mailing list)
On 9 August 2013 16:47, Harish Vishnu <vishnuharish12@gmail.com> wrote:
> rails s
> /usr/local/share/gems/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `require':
> cannot load such file -- mysql2/mysql2 (LoadError)

If you look in the lib folder mentioned above is there a subdirectory
mysql2 containing mysql2.so?
If not then I suspect your mysql2 gem has not installed correctly.

Colin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.