FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Issues installing mysql gem w/ macports mysql install

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
DanS



Joined: 26 Oct 2008
Posts: 2

PostPosted: Sun Oct 26, 2008 3:31 pm    Post subject: Issues installing mysql gem w/ macports mysql install Reply with quote

Hi, I'm using NetBeans 6.5_RC1 on OSX 10.5.5 and have run into the following issue with Rails on NetBeans.

Basically rake works for me from the console but does not seem to work when called from NetBeans.

In the project window right clicking a project and selecting 'migrate database' then choosing 'To Current Version' gives the following error:

!!! 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!
no such file to load -- mysql


When I try to fix this by going to 'Tools/Ruby Gems' and installing the mysql gem (version 2.7.3) I get this error:

ERROR: Failed to build gem native extension.

I think this is because I used MacPorts to install mysql and the installer isn't finding the mysql files. I was able to get the gem installer to work from the console by appending the argument "--with-mysql-config=/opt/local/bin/mysql_config5" to the gem install command. Unfortunately NetBeans doesn't seem to use the gems installed in this manner and I'm not finding any affordance to pass an option like this when using the NetBeans gem installer.

I would appreciate advice on how to resolve this issue.
Back to top
View user's profile Send private message
Erno Mononen
Posted via mailing list.





PostPosted: Mon Oct 27, 2008 8:08 am    Post subject: Issues installing mysql gem w/ macports mysql install Reply with quote

Hi,

Just to be sure, could you please double-check that you're using the
same platform from the IDE (in Project Properties -> Rails -> Ruby
Platform) and from the command line? Can you also specify what is the
platform that you're using?

Thanks,
Erno


DanS wrote:
Quote:
Hi, I'm using NetBeans 6.5_RC1 on OSX 10.5.5 and have run into the following issue with Rails on NetBeans.



Basically rake works for me from the console but does not seem to work when called from NetBeans.



In the project window right clicking a project and selecting 'migrate database' then choosing 'To Current Version' gives the following error:



!!! 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!

no such file to load -- mysql



When I try to fix this by going to 'Tools/Ruby Gems' and installing the mysql gem (version 2.7.3) I get this error:



ERROR: Failed to build gem native extension.



I think this is because I used MacPorts to install mysql and the installer isn't finding the mysql files. I was able to get the gem installer to work from the console by appending the argument "--with-mysql-config=/opt/local/bin/mysql_config5" to the gem install command. Unfortunately NetBeans doesn't seem to use the gems installed in this manner and I'm not finding any affordance to pass an option like this when using the NetBeans gem installer.



I would appreciate advice on how to resolve this issue.











Back to top
DanS



Joined: 26 Oct 2008
Posts: 2

PostPosted: Mon Oct 27, 2008 1:02 pm    Post subject: Reply with quote

I switched the platform setting and rake now works for me from the NetBeans menu.

For the record I had the platform set to:
Built-in JRuby 1.1.4 (rake didn't work)

When I changed it to:
Ruby 1.8.6-p114 (rake started working)

Erno, thanks for the gentle hint on how to fix this.

Dan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB