Problem with database creation

View: New views
3 Messages — Rating Filter:   Alert me  

Problem with database creation

by Bugzilla from gadial@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm using Netbeans 6.7.1, rails 2.3.2 and Jruby 1.2.0 on Kubuntu 9.04.



It seems I cannot create the development database by using rake db:create:all (or db:create). This is a well-known problem:



https://jira.codehaus.org/browse/JRUBY-3502?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel



But I don't understand the work-around they give, and in any case would prefer a "clean" solution (I don't want to create the database by hand each time I work on the project on a different computer).



Any ideas? This problem should arise for everyone trying to start a new project - have you encountered it?



Also, when I tried working with netbeans and rails a few months ago but using ruby 1.87 instead of JRuby I recall I had some major problem (but can't recall what) - is it still the case? What are the advantages of using JRuby?



Thanks






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Problem with database creation

by Chris Kutler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Gadial,

I agree, that solution is hard to understand. I also agree that creating
your own db is not a good solution. I think that you might also run into
problems when you use migrations (I did), and when this happens, it is
very difficult to emulate by hand all that Rails does. What db are you
using? I will look around and see if I can find any work arounds for
that db.

As for using Ruby instead of JRuby, know that I have never encountered
any problems and I have been doing that for several iterations of
releases. It would be helpful if you could remember what the problem was.

See http://www.netbeans.org/kb/docs/ruby/setting-up.html#native and
http://www.netbeans.org/kb/docs/ruby/setting-up.html#dbservers

Chris
http://blogs.sun.com/divas

gadial wrote:

> I'm using Netbeans 6.7.1, rails 2.3.2 and Jruby 1.2.0 on Kubuntu 9.04.
>
>
>
> It seems I cannot create the development database by using rake db:create:all (or db:create). This is a well-known problem:
>
>
>
> https://jira.codehaus.org/browse/JRUBY-3502?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
>
>
>
> But I don't understand the work-around they give, and in any case would prefer a "clean" solution (I don't want to create the database by hand each time I work on the project on a different computer).
>
>
>
> Any ideas? This problem should arise for everyone trying to start a new project - have you encountered it?
>
>
>
> Also, when I tried working with netbeans and rails a few months ago but using ruby 1.87 instead of JRuby I recall I had some major problem (but can't recall what) - is it still the case? What are the advantages of using JRuby?
>
>
>
> Thanks
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>  

--
Chris Kutler
Sun Cloud Learning Services


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Problem with database creation

by Chris Kutler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is a more detailed set of steps for the workaround given in https://jira.codehaus.org/browse/JRUBY-3502?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
Open your database.yml file.

Copy the "development:" block and paste it at the bottom of the file.

In the copied version, change "development" to "archive".

Save the file.

Run the db:create:all rake task.

For some reason, the development db is now created, but the archive db is not????

I then went on to generate a model and run migrations and that worked too.

I wrote about an alternative awhile ago -- using the mysql adapter. I just tested it and it still works. See http://blogs.sun.com/divas/entry/no_such_file_to_load.  I got the adapter from Rails 2.1.1

Here is what my configuration looks like when I use the mysql adapter:

development:
  adapter: mysql
  encoding: utf8
  reconnect: false
  database: somedb_development
  pool: 5
  username: me
  password: *****
  host: localhost



Chris Kutler wrote:

Gadial,

I agree, that solution is hard to understand. I also agree that creating your own db is not a good solution. I think that you might also run into problems when you use migrations (I did), and when this happens, it is very difficult to emulate by hand all that Rails does. What db are you using? I will look around and see if I can find any work arounds for that db.

As for using Ruby instead of JRuby, know that I have never encountered any problems and I have been doing that for several iterations of releases. It would be helpful if you could remember what the problem was.

See http://www.netbeans.org/kb/docs/ruby/setting-up.html#native and http://www.netbeans.org/kb/docs/ruby/setting-up.html#dbservers

Chris
http://blogs.sun.com/divas

gadial wrote:
I'm using Netbeans 6.7.1, rails 2.3.2 and Jruby 1.2.0 on Kubuntu 9.04.



It seems I cannot create the development database by using rake db:create:all (or db:create). This is a well-known problem:



https://jira.codehaus.org/browse/JRUBY-3502?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel



But I don't understand the work-around they give, and in any case would prefer a "clean" solution (I don't want to create the database by hand each time I work on the project on a different computer).



Any ideas? This problem should arise for everyone trying to start a new project - have you encountered it?



Also, when I tried working with netbeans and rails a few months ago but using ruby 1.87 instead of JRuby I recall I had some major problem (but can't recall what) - is it still the case? What are the advantages of using JRuby?



Thanks






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 


-- 
Chris Kutler
Sun Cloud Learning Services
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@...