On Jul 27, 8:43 am, Mirč <[email protected]> wrote:
> Hi Gavi !
>
> I joined this great course late too.
> I made first lessons with Netbeans 6.7, but at RailsBasics I could not
> use it to connect to MySql.
Actually the way to connect ot MySql is not a problem of Netbeans
version, but of Rails version.
In Rails 2.3, which is the version of rails in Netbeans 6.7, you need
to use the correct adapter for MySQL.
I'm on a Mac, but here's how I declare it in a new Project:
1 - Enter the name of the application, choose the right jruby
platform, and the server in the first panel when creating a project
2 - Click on Next,
3 - Click on Specify Database Information Directly in the second
panel , and enter the User name (maybe root by default) and the
password (maybe nothing at all by default) and click on finish.
Next when you want to create Database (rake task does not work in that
case), right click on the MySQL server in Netbeans services, choose
create database, enter the name of the database you want to create,
and that's all.
To connect to a given database, just use the same way as in Netbeans
6.5; for example to view table.
You have to launch MySQL server beforehand of course as usual.
You may eventually have to install the following gems:
activerecord-jdbc-adapter
activerecord-jdbcmysql-adapter
jdbc-mysql
(Sorry, I cannot remember if they are installed by default).
There is an excellent note on running jruby with rails 2.3 here:
http://www.netbeans.org/kb/docs/ruby/setting-up.html#dbservers
I'm on lesson testing, and so far, apart from rewriting all examples
for rails 2.3.2 which is easily handled by running the rails update
rake task, it has worked relatively well.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---