sudo gem install mysql problem

P

Pen Ttt

today i have installed ubuntu10.04.
pt@pt-laptop:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
pt@pt-laptop:~$ gem -v
1.3.5
pt@pt-laptop:~$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:10


Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
for inspection.
Results logged to
/var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

how to sovle the problem?
 
R

Rich McGrath

[Note: parts of this message were removed to make it a legal post.]

try sudo gem install mysql -- --with-mysql-dir= *Put Location Mysql
directory here.*
I.E.
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
sudo gem install mysql --
--with-mysql-config=/usr/local/mysql/bin/mysql_config

Rich
 
L

Luis Lavena

today i have installed ubuntu10.04.
pt@pt-laptop:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
pt@pt-laptop:~$ gem -v
1.3.5
pt@pt-laptop:~$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:10

Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
for inspection.
Results logged to
/var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

how to sovle the problem?

You need a full Ruby installation, from the path "/var/lib" looks like
you're running Ubuntu.

Please install ruby-dev package and try again.

Also, you need mysql and libmysql-dev packages to compile.
 
R

Rich McGrath

[Note: parts of this message were removed to make it a legal post.]

This Doc might help.

https://help.ubuntu.com/community/RubyOnRails

<https://help.ubuntu.com/community/RubyOnRails>Rich

today i have installed ubuntu10.04.
pt@pt-laptop:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
pt@pt-laptop:~$ gem -v
1.3.5
pt@pt-laptop:~$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:10

Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
for inspection.
Results logged to
/var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

how to sovle the problem?

You need a full Ruby installation, from the path "/var/lib" looks like
you're running Ubuntu.

Please install ruby-dev package and try again.

Also, you need mysql and libmysql-dev packages to compile.


--
Rich McGrath
Tech Lead for Bitmob.com
(e-mail address removed)
www.Bitmob.com
www.twitter.com/Bitmobrich
 
L

lyn

today i have installed ubuntu10.04.
pt@pt-laptop:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
pt@pt-laptop:~$ gem -v
1.3.5
pt@pt-laptop:~$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:10
Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
for inspection.
Results logged to
/var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
how to sovle the problem?

You need a full Ruby installation, from the path "/var/lib" looks like
you're running Ubuntu.

Please install ruby-dev package and try again.

Also, you need mysql and libmysql-dev packages to compile.

I've been scratching my head all afternoon as you suggested sudo apt-
get install ruby-dev and then running sudo gem install mysql worked
sort of I got a whole lot of definition errors but I'm closer than I
was
 
L

lyn

today i have installed ubuntu10.04.
pt@pt-laptop:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
pt@pt-laptop:~$ gem -v
1.3.5
pt@pt-laptop:~$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:10:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:10

Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
for inspection.
Results logged to
/var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

how to sovle the problem?

I was getting the exact same error - I can get sudo gem install mysql
to load only after running sudo apt-get install ruby-dev but then
rails app reports wrong wrong gem version and asks me to 2.2.3 back
from 2.2.5 sudo gem install -v=2.2.3 rails run app and web brick
starts and displays default page go to generators scaffold works then
rake db migrate you should get a password error alter user name and
password for all environments and I am hoping that works
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top