Forum: Ruby on Rails installing ruby gem mysql

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Steven S. (Guest)
on 2008-12-07 16:46
Hi All;
I am new to RoR and have a new MacBook Pro with OS X 10.5.5
This is what I have on it.

bash-3.2$ cd /usr/local
bash-3.2$ ls
mysql                           mysql-5.1.30-osx10.5-x86

bash-3.2$ ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

bash-3.2$ gem install mysql
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Library/Ruby/Gems/1.8/gems/mysql-2.7/COPYING
bash-3.2$

bash-3.2$ sudo -s
Password:
bash-3.2# gem install mysql
Bulk updating Gem source index for: http://gems.rubyforge.org
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb install mysql
can't find header files for ruby.


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.7
for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem_make.out

Any help is appreciated.
Thanks
Frederick C. (Guest)
on 2008-12-07 17:22
(Received via mailing list)
On 7 Dec 2008, at 14:46, Steven Steele wrote:

>
> Hi All;
> I am new to RoR and have a new MacBook Pro with OS X 10.5.5
> This is what I have on it.
>

The hivelogic/ dan benjamin guide (
http://danbenjamin.com/articles/2008/02/ruby-rails-leopard
  ) covers this (you can ignore most it and just skip to the
installing the mysql gem part)

Fred
Billy H. (Guest)
on 2008-12-07 17:22
(Received via mailing list)
Did you install mysql yet?

On Sun, Dec 7, 2008 at 10:46 PM, Steven Steele <
removed_email_address@domain.invalid> wrote:

> ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
> Bulk updating Gem source index for: http://gems.rubyforge.org
> for inspection.
> Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem_make.out
>
> Any help is appreciated.
> Thanks
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


--
TWRUG Blog:
http://blog.rubyonrails.org.tw

CFC on Rails:
http://zusocfc.blogspot.com

Only two surfaces of a box:
http://blog.pixnet.net/zusocfc
Steven S. (Guest)
on 2008-12-08 04:49
Steven Steele wrote:
> Hi All;
> I am new to RoR and have a new MacBook Pro with OS X 10.5.5
> This is what I have on it.
>
> bash-3.2$ cd /usr/local
> bash-3.2$ ls
> mysql                           mysql-5.1.30-osx10.5-x86
>
> bash-3.2$ ruby -v
> ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
>
> bash-3.2$ gem install mysql
> Bulk updating Gem source index for: http://gems.rubyforge.org
> ERROR:  While executing gem ... (Errno::EACCES)
>     Permission denied - /Library/Ruby/Gems/1.8/gems/mysql-2.7/COPYING
> bash-3.2$
>
> bash-3.2$ sudo -s
> Password:
> bash-3.2# gem install mysql
> Bulk updating Gem source index for: http://gems.rubyforge.org
> Building native extensions.  This could take a while...
> ERROR:  Error installing mysql:
>         ERROR: Failed to build gem native extension.
>
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> extconf.rb install mysql
> can't find header files for ruby.
>
>
> Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.7
> for inspection.
> Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem_make.out
>
> Any help is appreciated.
> Thanks

Hi All this worked for me.

sudo gem install mysql --
--with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions.  This could take a while...
Successfully installed mysql-2.7
1 gem installed
Steven S. (Guest)
on 2008-12-09 15:56
Thanks for the response.
MySQL is installed. All is OK at this point,
but sure to have more questions later.
-sjs


Billy H. wrote:
> Did you install mysql yet?
>
> On Sun, Dec 7, 2008 at 10:46 PM, Steven Steele <
> removed_email_address@domain.invalid> wrote:
>
>> ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
>> Bulk updating Gem source index for: http://gems.rubyforge.org
>> for inspection.
>> Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem_make.out
>>
>> Any help is appreciated.
>> Thanks
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>> >
>>
>
>
> --
> TWRUG Blog:
> http://blog.rubyonrails.org.tw
>
> CFC on Rails:
> http://zusocfc.blogspot.com
>
> Only two surfaces of a box:
> http://blog.pixnet.net/zusocfc
This topic is locked and can not be replied to.