Ruby, mysql & NetBeans (6.7.1)

Hello, I’m new on Ruby on NetBeans, I’m working with a windows XP. I’m
tried to build mysql gem and I’ve got an error message:

JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

C:/Archivos de programa/NetBeans 6.7.1/ruby2/jruby-1.2.0/bin/jruby.bat
extconf.rb install mysql --no-rdoc --no-ri
El sistema no puede hallar la ruta especificada.

Should somebody help me, plese ? Thanks a lot.

Luis Sanmartin wrote:

Hello, I’m new on Ruby on NetBeans,

I would strongly recommend that you not use NetBeans for Rails
development. It’s a great IDE for other things, but it’s overkill for
Rails. Try KomodoEdit or similar.

I’m working with a windows XP. I’m
tried to build mysql gem and I’ve got an error message:

JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

C:/Archivos de programa/NetBeans 6.7.1/ruby2/jruby-1.2.0/bin/jruby.bat
extconf.rb install mysql --no-rdoc --no-ri
El sistema no puede hallar la ruta especificada.

Should somebody help me, plese ? Thanks a lot.

Do you have the mySQL DB server installed? You need that – or at least
the dev headers – for the gem to build, I believe.

(BTW, try PostgreSQL at some point. It’s a better DB.)

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Thanks Marnen for response.

yes I have mysql how service and it’s running.

Reviewing the error, I found that the problem is to run jruby.bat,
because the error message says "The system can not find the path
specified. I have executed jruby.bat by command line and gives me the
same error. I’ve open the file but I didn’t understand the variables in
the code

The only thing I did was add to the Windows system var PATH the
following path but nothing has changed: “C: \ Program Files \ NetBeans
6.7.1 \ ruby2 \ jruby-1.2.0 \ bin”


thanks,
Luis Fernando

@echo off
rem

rem jruby.bat - Start Script for the JRuby Interpreter
rem
rem for info on environment variables, see internal batch script
_jrubyvars.bat

setlocal

rem Sometimes, when jruby.bat is being invoked from another BAT file,
rem %~dp0 is incorrect and points to the current dir, not to JRuby’s bin
dir,
rem so we look on the PATH in such cases.
IF EXIST “%~dp0_jrubyvars.bat” (set FULL_PATH=%~dp0) ELSE (set
FULL_PATH=%~dp$PATH:0)

call “%FULL_PATH%_jrubyvars.bat” %*

if %JRUBY_BAT_ERROR%==0 “%_STARTJAVA%” %_VM_OPTS%
-Xbootclasspath/a:“%JRUBY_CP%” -classpath “%CP%;%CLASSPATH%”
-Djruby.home=“%JRUBY_HOME%” -Djruby.lib=“%JRUBY_HOME%\lib”
-Djruby.shell=“cmd.exe” -Djruby.script=jruby.bat org.jruby.Main
%JRUBY_OPTS% %_RUBY_OPTS%
set E=%ERRORLEVEL%

call “%FULL_PATH%_jrubycleanup”

rem 1. exit must be on the same line in order to see local %E% variable!
rem 2. we must use cmd /c in order for the exit code properly returned!
rem See JRUBY-2094 for more details.
endlocal & cmd /d /c exit /b %E%


Marnen Laibow-Koser wrote:

Luis Sanmartin wrote:

Hello, I’m new on Ruby on NetBeans,

I would strongly recommend that you not use NetBeans for Rails
development. It’s a great IDE for other things, but it’s overkill for
Rails. Try KomodoEdit or similar.

I’m working with a windows XP. I’m
tried to build mysql gem and I’ve got an error message:

JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

C:/Archivos de programa/NetBeans 6.7.1/ruby2/jruby-1.2.0/bin/jruby.bat
extconf.rb install mysql --no-rdoc --no-ri
El sistema no puede hallar la ruta especificada.

Should somebody help me, plese ? Thanks a lot.

Do you have the mySQL DB server installed? You need that – or at least
the dev headers – for the gem to build, I believe.

(BTW, try PostgreSQL at some point. It’s a better DB.)

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Sameera G. wrote:

Luis Sanmartin wrote:

Hello, I’m new on Ruby on NetBeans, I’m working with a windows XP. I’m
tried to build mysql gem and I’ve got an error message:

JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

C:/Archivos de programa/NetBeans 6.7.1/ruby2/jruby-1.2.0/bin/jruby.bat
extconf.rb install mysql --no-rdoc --no-ri
El sistema no puede hallar la ruta especificada.

Should somebody help me, plese ? Thanks a lot.

Hi Sanmartin,

First of all I agreed with Marnen, I’m using NetBeans for development
(on linux) and thinking of going to another editor as its a huge
resource hog…

For your problem you have 3 options,

1 - Change your ruby platform from JRuby to Ruby
(go to your rails project properties
select Rails - from the left hand side
change the Ruby Platform (Assuming you dont want to use JRuby)
)

2 - as Marnen says, you can try PostgreSQL

3 - If you are new to rails, why not using sqlite3 which comes default
with rails, you dont want to install anything, just create a project
go to command line - type rails

and sqlite3 is automatically setting for you

development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

Hope this helps,

cheers,
sameera

Hello Sameera, Marnen.

I’ll be honest, the Marnen council did not convince me, so I kept
researching and finding information on the Internet but without success.
In my research I have seen that the problem is not with MySQL and there
should be some sort of incompatibility between Windows XP and Ruby 1.8,
then after trying to incorporate into my installed NetBeans other
“Gems”, I got the same result, so I decided to try for “command line”
for both JRuby and Ruby, and I’m getting the same error message.
"invalid gem format”.
As I read that exists some Gems with “C” code, so I decided to install
MinGW and set PATH, but without success. Any ideas please?

greetings
fernando

Luis Sanmartin wrote:

Hello, I’m new on Ruby on NetBeans, I’m working with a windows XP. I’m
tried to build mysql gem and I’ve got an error message:

JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

C:/Archivos de programa/NetBeans 6.7.1/ruby2/jruby-1.2.0/bin/jruby.bat
extconf.rb install mysql --no-rdoc --no-ri
El sistema no puede hallar la ruta especificada.

Should somebody help me, plese ? Thanks a lot.

Hi Sanmartin,

First of all I agreed with Marnen, I’m using NetBeans for development
(on linux) and thinking of going to another editor as its a huge
resource hog…

For your problem you have 3 options,

1 - Change your ruby platform from JRuby to Ruby
(go to your rails project properties
select Rails - from the left hand side
change the Ruby Platform (Assuming you dont want to use JRuby)
)

2 - as Marnen says, you can try PostgreSQL

3 - If you are new to rails, why not using sqlite3 which comes default
with rails, you dont want to install anything, just create a project
go to command line - type rails

and sqlite3 is automatically setting for you

development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

Hope this helps,

cheers,
sameera

Hi fernando,

To Be sure I know there is no compatibility with Windows XP and Ruby
1.8,
(coz i have used it)

If possible why not try following

uninstall netbeans
uninstall ruby
uninstall rails (gem uninstall )

Do everything from the scratch

install ruby (Download Ruby) (standard ruby not
jruby)
install rubygems (http://docs.rubygems.org/read/chapter/3)
install rails (http://rubyonrails.org/download)

and also check this out

Hope this helps :smiley:

Sameera G. wrote:

Hi fernando,

To Be sure I know there is no compatibility with Windows XP and Ruby
1.8,
(coz i have used it)

If possible why not try following

uninstall netbeans
uninstall ruby
uninstall rails (gem uninstall )

Do everything from the scratch

install ruby (Download Ruby) (standard ruby not
jruby)
install rubygems (http://docs.rubygems.org/read/chapter/3)
install rails (http://rubyonrails.org/download)

and also check this out

Installing Rails on Windows (step-by-step tutorial) | All About Ruby

Hope this helps :smiley:

thanks I’ll try, I will communicate the result …

Fernando…

Sameera G. wrote:

Hi fernando,

To Be sure I know there is no compatibility with Windows XP and Ruby
1.8,
(coz i have used it)

If possible why not try following

uninstall netbeans
uninstall ruby
uninstall rails (gem uninstall )

Do everything from the scratch

install ruby (Download Ruby) (standard ruby not
jruby)
install rubygems (http://docs.rubygems.org/read/chapter/3)
install rails (http://rubyonrails.org/download)

and also check this out

Installing Rails on Windows (step-by-step tutorial) | All About Ruby

Hope this helps :smiley:

Hello, well, these days I’ve been to Linux, Ubuntu 9.10, with the latest
updates. I have installed ruby with the command “apt-get install ruby”
and I noticed that I have version 1.8.7. I wanted to install version 9
and I have done through the package manager “Synaptic”. when I invoke
ruby by CLI, I see that version 1.8 is maintained, I conducted a search
in the system and see that I have 3 versions: 1.8.7, 1.9.0, 1.9.1. And
do not how to activate the 1.9.1. I have edited the “/ etc / apparmor.d
/ abstractions / ruby” and I noticed that is a script that expects
parameters to know which version to run. But until I arrived there, I do
not know how to continue to make it work for version 1.9. You can help
me

Thanks
Fernando