Netbeans 7. JRuby and sqlite3

Hi, I’m going to a problem I can’t found solution for the moment.

I’m trying to start to learn, Rails. I downloaded JRuby 1.6 and is in
the path, and installed Netbeans 7b2 with Rails support.

When I try to create a new rails project, create the structure, but
gives me the error:
Rake tasks fetching failed with (working directory:

googling this error I get this:

With this, in the folder of the project, I do:

[[email protected] RailsApplication5]$ jruby -S rake -D
(in /home/glpunzi/NetBeansProjects/RailsApplication5)
Could not find gem ‘mysql2 (>= 0, runtime)’ in any of the gem sources
listed in your Gemfile.

and then:
[[email protected] RailsApplication5]$ jruby -S rake -D
(in /home/glpunzi/NetBeansProjects/RailsApplication5)
Could not find gem ‘mysql2 (>= 0, runtime)’ in any of the gem sources
listed in your Gemfile.

I don’t have mysql installed right now, but latest time I changed this
in the project creation and the problem was with sqlite3. Same messages.

What could be the problem?


You need to edit the gemfile in the root of your rails project to
include the gems needed for mysql (or whetever database you are using).

Check out the wiki for more info.



You will need

Hi Giuseppe Luigi,

“installed Netbeans 7b2 with Rails support” are you sure ?

Seems that netbeans 7 has no Ruby no Rails support at all…

Can you give some instructions on how to install nb 7b2 with ruby/rails
support so I can try to understand what is your problem ?

Many thanks in advance !

[[email protected] RailsApplication5]$ jruby -S gem install sqlite3
Building native extensions. This could take a while…
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.

    /home/glpunzi/desarrollo/jruby1.6/bin/jruby extconf.rb

WARNING: JRuby does not support native extensions or the `mkmf’ library
very well.
Check for alternatives.
mkmf.rb can’t find header files for ruby at

Gem files will remain installed in
for inspection.
Results logged to

This is the error I get If I try to install the gem of the error of

I will try more things later…


I would try using ‘jruby -S rails -m’ from
the command-line until we get an updated version of nbruby which
supports Rails 3. This will make a Gemfile which uses
JRuby-friendly gems for ActiveRecord. You will need to also run
‘bundle install’ once from the command-line to install/setup the gems
for use in your application. At that point I am hoping most of the
other basic functions of nbruby Rails will work (Going through and
listing which ones don’t work would be helpful for us).

The path you are going down now is trying to leverage JRuby’s
c-extension support. This support is working better than we thought
it ever would, but I don’t think I would recommend it since there is
decent JRuby-specific versions at your disposal (e.g. ar-jdbc).


On Fri, Mar 18, 2011 at 5:06 AM, Giuseppe luigi Punzi ruiz
[email protected] wrote:


blog: twitter: tom_enebo
mail: [email protected]

@Phil Goldsbrough

Hi, I forgot to post one more thing, because I tried to install the
gems, without success. I will try to post it this afternoon.



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs