Getting mysql gem working with ruby-1.9.3 on rvm

97 views
Skip to first unread message

Myth17

unread,
Mar 21, 2012, 12:50:30 PM3/21/12
to rubyonra...@googlegroups.com
Hello Everyone

I am trying to setup mysql gem on ruby-1.9.3 installed with rvm. I want to set up the 'redmine'.  To install mysql gem I used -->
sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/bin/mysql_config

When I issue --> RAILS_ENV=production rake db:migrate, I get
/Users/myth/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.2/lib/bundler/runtime.rb:211: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
cannot load such file -- mysql

However I have successfully deployed redmine1.3 on default ruby1.8.7 installation of OSX with installing mysql gem the very same way.

I want to work on the latest trunk with ruby-1.9.3
How can I resolve the issue? I have been searching the mailing list and found similar posts, however could not solve the problem.

Maksim Morozov

unread,
Mar 21, 2012, 2:00:54 PM3/21/12
to rubyonra...@googlegroups.com
Why do you use sudo?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/rSDZhsf31yoJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Maksim Morozov

unread,
Mar 21, 2012, 2:04:16 PM3/21/12
to rubyonra...@googlegroups.com
Stop it now! ;)

Myth17

unread,
Mar 21, 2012, 6:56:05 PM3/21/12
to rubyonra...@googlegroups.com
Without sudo I get -->
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/mysql-2.8.1/COPYING

On Wednesday, March 21, 2012 11:30:54 PM UTC+5:30, Maksim Morozov wrote:
Why do you use sudo?

On Wed, Mar 21, 2012 at 8:50 PM, Myth17 <nitish...@gmail.com> wrote:
Hello Everyone

I am trying to setup mysql gem on ruby-1.9.3 installed with rvm. I want to set up the 'redmine'.  To install mysql gem I used -->
sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/bin/mysql_config

When I issue --> RAILS_ENV=production rake db:migrate, I get
/Users/myth/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.2/lib/bundler/runtime.rb:211: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
cannot load such file -- mysql

However I have successfully deployed redmine1.3 on default ruby1.8.7 installation of OSX with installing mysql gem the very same way.

I want to work on the latest trunk with ruby-1.9.3
How can I resolve the issue? I have been searching the mailing list and found similar posts, however could not solve the problem.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/rSDZhsf31yoJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.

Maksim Morozov

unread,
Mar 22, 2012, 4:38:45 AM3/22/12
to rubyonra...@googlegroups.com
try: rm -rf /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/mysql-2.8.1/
and gem install mysql  again
don't mix rvm and sudo if you don't use Multi-User install of rvm

To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qbfCMrF_0owJ.

To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.

Maksim Morozov

unread,
Mar 22, 2012, 4:41:31 AM3/22/12
to rubyonra...@googlegroups.com
you can get really ugly stuff like you have now

Myth17

unread,
Mar 22, 2012, 7:19:17 AM3/22/12
to rubyonra...@googlegroups.com
No help! :(

Geraldo Andrade

unread,
Mar 22, 2012, 7:16:42 AM3/22/12
to Ruby on Rails: Talk
I have solved this problem using chown

On 21 mar, 13:50, Myth17 <nitishupr...@gmail.com> wrote:
> Hello Everyone
>
> I am trying to setup mysql gem on ruby-1.9.3 installed with rvm. I want to
> set up the 'redmine'.  To install mysql gem I used -->
> sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql --
> --with-mysql-config=/usr/local/bin/mysql_config
>
> When I issue --> RAILS_ENV=production rake db:migrate, I get
> /Users/myth/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.2/lib/bundler/r untime.rb:211:

Myth17

unread,
Mar 22, 2012, 10:14:36 AM3/22/12
to rubyonra...@googlegroups.com
I did a clean install of ruby1.9.3 and also mysql gem without sudo.
However after successful installation of gem I get.

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the ./Mysql directory.

Where do I find the mysql directory? :|
Reply all
Reply to author
Forward
0 new messages