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 
  

Various problems for running Ruby-1.9.1 and JRuby with 1.9 support

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
Chauk-Mean
Posted via mailing list.





PostPosted: Fri Feb 27, 2009 4:45 pm    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Hi,

I'm using NB6.7M2 on Windows XP.

1/ I'm trying to use jruby1.2rc1 with 1.9 support :
I tried to add the option --1.9 in the Project Properties \ Run without
success (in Arguments, in Ruby Options, ...).
The option is not provided correctly to jruby.

2/ I'm also using ruby-1.9.1-p0 mingw32 :

a) The detection of the platform reports incorrectly the Gem Tool (it
indicates the gem tool from my jruby1.2rc1 platform).
All other elements are reported correctly (Platform Name, Interpreter, Gem
Home, Gem Path).
Note that the jruby1.2rc1 bin folder is defined after the ruby-1.9.1-p0 bin
folder in my PATH env variable and I have added the jruby platform manually
(via the Add Platform button in the Ruby Platform Manager).

b) On a project configured for ruby-1.9.1, when I try to run a rake task, NB
uses the jruby rake script resulting in an error.

Thanks for any help.

Chauk-Mean.
--
View this message in context: http://www.nabble.com/Various-problems-for-running-Ruby-1.9.1-and-JRuby-with-1.9-support-tp22249585p22249585.html
Sent from the NetBeans Ruby Users mailing list archive at Nabble.com.
Back to top
Erno Mononen
Posted via mailing list.





PostPosted: Fri Feb 27, 2009 7:41 pm    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Hi Chauk-Mean,


Chauk-Mean wrote:
Quote:
Hi,

I'm using NB6.7M2 on Windows XP.

1/ I'm trying to use jruby1.2rc1 with 1.9 support :
I tried to add the option --1.9 in the Project Properties \ Run without
success (in Arguments, in Ruby Options, ...).
The option is not provided correctly to jruby.


The IDE runs JRuby through Java, so you need to specify
-Djruby.compat.version=RUBY1_9 in the JVM Args text field.

Quote:
2/ I'm also using ruby-1.9.1-p0 mingw32 :

a) The detection of the platform reports incorrectly the Gem Tool (it
indicates the gem tool from my jruby1.2rc1 platform).
All other elements are reported correctly (Platform Name, Interpreter, Gem
Home, Gem Path).
Note that the jruby1.2rc1 bin folder is defined after the ruby-1.9.1-p0 bin
folder in my PATH env variable and I have added the jruby platform manually
(via the Add Platform button in the Ruby Platform Manager).

b) On a project configured for ruby-1.9.1, when I try to run a rake task, NB
uses the jruby rake script resulting in an error.


Not sure what's causing this, seems like a bug in any case. Can you turn
on detailed logging (http://wiki.netbeans.org/FaqRubyNBLogging70) and
file an issue for this with the log file attached? Thanks in advance!

Erno
Back to top
Chauk-Mean
Posted via mailing list.





PostPosted: Mon Mar 02, 2009 9:52 am    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Hi,



Quote:
Quote:
1/ I'm trying to use jruby1.2rc1 with 1.9 support :
I tried to add the option --1.9 in the Project Properties \ Run without
success (in Arguments, in Ruby Options, ...).
The option is not provided correctly to jruby.

Quote:
The IDE runs JRuby through Java, so you need to specify
-Djruby.compat.version=RUBY1_9 in the JVM Args text field.

This works. Thanks.

Quote:
Quote:
2/ I'm also using ruby-1.9.1-p0 mingw32 :

a) The detection of the platform reports incorrectly the Gem Tool (it
indicates the gem tool from my jruby1.2rc1 platform).
All other elements are reported correctly (Platform Name, Interpreter,
Gem
Home, Gem Path).
Note that the jruby1.2rc1 bin folder is defined after the ruby-1.9.1-p0
bin
folder in my PATH env variable and I have added the jruby platform
manually
(via the Add Platform button in the Ruby Platform Manager).

b) On a project configured for ruby-1.9.1, when I try to run a rake task,
NB
uses the jruby rake script resulting in an error.


Quote:
Not sure what's causing this, seems like a bug in any case. Can you turn
on detailed logging (http://wiki.netbeans.org/FaqRubyNBLogging70) and
file an issue for this with the log file attached? Thanks in advance!

I just created a Ruby project and I used the ruby-1.9.1 platform.
Then I run the rake task to create the doc.

Here is the output from the console :

<internal:gem_prelude>:249:in `push_gem_version_on_load_path': undefined
method `<=>' for nil:NilClass (NoMethodError)
from <internal:gem_prelude>:14:in `gem'
from C:/opt/jruby-1.2.0RC1/bin/rake:18:in `<main>'

As you can see, the ruby-1.9's built-in rake is not used.

I attached the log file.

http://www.nabble.com/file/p22284784/messages.log messages.log

I hope that will help.

Cheers.

Chauk-Mean.

--
View this message in context: http://www.nabble.com/Various-problems-for-running-Ruby-1.9.1-and-JRuby-with-1.9-support-tp22249585p22284784.html
Sent from the NetBeans Ruby Users mailing list archive at Nabble.com.
Back to top
Chauk-Mean
Posted via mailing list.





PostPosted: Mon Mar 02, 2009 9:52 am    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Hi,



Quote:
Quote:
1/ I'm trying to use jruby1.2rc1 with 1.9 support :
I tried to add the option --1.9 in the Project Properties \ Run without
success (in Arguments, in Ruby Options, ...).
The option is not provided correctly to jruby.

Quote:
The IDE runs JRuby through Java, so you need to specify
-Djruby.compat.version=RUBY1_9 in the JVM Args text field.

This works. Thanks.

Quote:
Quote:
2/ I'm also using ruby-1.9.1-p0 mingw32 :

a) The detection of the platform reports incorrectly the Gem Tool (it
indicates the gem tool from my jruby1.2rc1 platform).
All other elements are reported correctly (Platform Name, Interpreter,
Gem
Home, Gem Path).
Note that the jruby1.2rc1 bin folder is defined after the ruby-1.9.1-p0
bin
folder in my PATH env variable and I have added the jruby platform
manually
(via the Add Platform button in the Ruby Platform Manager).

b) On a project configured for ruby-1.9.1, when I try to run a rake task,
NB
uses the jruby rake script resulting in an error.


Quote:
Not sure what's causing this, seems like a bug in any case. Can you turn
on detailed logging (http://wiki.netbeans.org/FaqRubyNBLogging70) and
file an issue for this with the log file attached? Thanks in advance!

I just created a Ruby project and I used the ruby-1.9.1 platform.
Then I run the rake task to create the doc.

Here is the output from the console :

<internal:gem_prelude>:249:in `push_gem_version_on_load_path': undefined
method `<=>' for nil:NilClass (NoMethodError)
from <internal:gem_prelude>:14:in `gem'
from C:/opt/jruby-1.2.0RC1/bin/rake:18:in `<main>'

As you can see, the ruby-1.9's built-in rake is not used.

I attached the log file.

http://www.nabble.com/file/p22284785/messages.log messages.log

I hope that will help.

Cheers.

Chauk-Mean.

--
View this message in context: http://www.nabble.com/Various-problems-for-running-Ruby-1.9.1-and-JRuby-with-1.9-support-tp22249585p22284785.html
Sent from the NetBeans Ruby Users mailing list archive at Nabble.com.
Back to top
Erno Mononen
Posted via mailing list.





PostPosted: Mon Mar 02, 2009 12:20 pm    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Chauk-Mean wrote:
Quote:
Quote:
Not sure what's causing this, seems like a bug in any case. Can you turn
on detailed logging (http://wiki.netbeans.org/FaqRubyNBLogging70) and
file an issue for this with the log file attached? Thanks in advance!


I just created a Ruby project and I used the ruby-1.9.1 platform.
Then I run the rake task to create the doc.

Here is the output from the console :

<internal:gem_prelude>:249:in `push_gem_version_on_load_path': undefined
method `<=>' for nil:NilClass (NoMethodError)
from <internal:gem_prelude>:14:in `gem'
from C:/opt/jruby-1.2.0RC1/bin/rake:18:in `<main>'

As you can see, the ruby-1.9's built-in rake is not used.

I attached the log file.

http://www.nabble.com/file/p22284784/messages.log messages.log

I hope that will help.


Thanks, I'll take a look at it.

Erno
Back to top
Erno Mononen
Posted via mailing list.





PostPosted: Wed Mar 04, 2009 3:11 pm    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Erno Mononen wrote:
Quote:
Chauk-Mean wrote:
Quote:
Quote:
Not sure what's causing this, seems like a bug in any case. Can you
turn on detailed logging
(http://wiki.netbeans.org/FaqRubyNBLogging70) and file an issue for
this with the log file attached? Thanks in advance!


I just created a Ruby project and I used the ruby-1.9.1 platform.
Then I run the rake task to create the doc.

Here is the output from the console :

<internal:gem_prelude>:249:in `push_gem_version_on_load_path': undefined
method `<=>' for nil:NilClass (NoMethodError)
from <internal:gem_prelude>:14:in `gem'
from C:/opt/jruby-1.2.0RC1/bin/rake:18:in `<main>'

As you can see, the ruby-1.9's built-in rake is not used.

I attached the log file.

http://www.nabble.com/file/p22284784/messages.log messages.log
I hope that will help.


Thanks, I'll take a look at it.

I had a look at the log finally. The problem is that there is no
"C:/opt/ruby-1.9.1-mingw/bin/rake" file, just
"C:/opt/ruby-1.9.1-mingw/bin/rake.bat" (which you can't run through
ruby), so the IDE ends up using a different rake. Need to look at how to
fix this in the IDE, meanwhile you should be able to workaround this by
creating the C:/opt/ruby-1.9.1-mingw/bin/rake file by stripping off the
.bat stuff from the already existing rake.bat file. For example leaving
just the following should work:

begin
require 'rake'
rescue LoadError
require 'rubygems'
require 'rake'
end
Rake.application.run

HTH,
Erno
Back to top
Erno Mononen
Posted via mailing list.





PostPosted: Wed Mar 04, 2009 3:18 pm    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Erno Mononen wrote:
Quote:
Erno Mononen wrote:
Quote:
Chauk-Mean wrote:
Quote:
Quote:
Not sure what's causing this, seems like a bug in any case. Can you
turn on detailed logging
(http://wiki.netbeans.org/FaqRubyNBLogging70) and file an issue for
this with the log file attached? Thanks in advance!


I just created a Ruby project and I used the ruby-1.9.1 platform.
Then I run the rake task to create the doc.

Here is the output from the console :

<internal:gem_prelude>:249:in `push_gem_version_on_load_path':
undefined
method `<=>' for nil:NilClass (NoMethodError)
from <internal:gem_prelude>:14:in `gem'
from C:/opt/jruby-1.2.0RC1/bin/rake:18:in `<main>'

As you can see, the ruby-1.9's built-in rake is not used.

I attached the log file.

http://www.nabble.com/file/p22284784/messages.log messages.log
I hope that will help.


Thanks, I'll take a look at it.

I had a look at the log finally. The problem is that there is no
"C:/opt/ruby-1.9.1-mingw/bin/rake" file, just
"C:/opt/ruby-1.9.1-mingw/bin/rake.bat" (which you can't run through ruby),

To correct myself: running rake.bat is possible by using the -x switch.
Probably that's what we should do in the IDE.

Erno
Back to top
Chauk-Mean
Posted via mailing list.





PostPosted: Thu Mar 05, 2009 5:20 pm    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Hi,

Erno Mononen wrote:
Quote:
Quote:
I had a look at the log finally. The problem is that there is no
"C:/opt/ruby-1.9.1-mingw/bin/rake" file, just
"C:/opt/ruby-1.9.1-mingw/bin/rake.bat" (which you can't run through
ruby),

The installation of ruby-1.9 on Windows (both MSVC and MinGW builds) does
not install the shell version of ruby commands (irb, gem, rake ...). Only
the windows .bat files are installed.

Quote:
To correct myself: running rake.bat is possible by using the -x switch.
Probably that's what we should do in the IDE.

OK. So this will be fixed in the next release of Netbeans.
In the meantime, is there a way to fix it ?

Cheers,

Chauk-Mean.
--
View this message in context: http://www.nabble.com/Various-problems-for-running-Ruby-1.9.1-and-JRuby-with-1.9-support-tp22249585p22356188.html
Sent from the NetBeans Ruby Users mailing list archive at Nabble.com.
Back to top
Erno Mononen
Posted via mailing list.





PostPosted: Thu Mar 05, 2009 8:04 pm    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Chauk-Mean wrote:
Quote:
Hi,

Erno Mononen wrote:

Quote:
Quote:
I had a look at the log finally. The problem is that there is no
"C:/opt/ruby-1.9.1-mingw/bin/rake" file, just
"C:/opt/ruby-1.9.1-mingw/bin/rake.bat" (which you can't run through
ruby),


The installation of ruby-1.9 on Windows (both MSVC and MinGW builds) does
not install the shell version of ruby commands (irb, gem, rake ...). Only
the windows .bat files are installed.


Quote:
To correct myself: running rake.bat is possible by using the -x switch.
Probably that's what we should do in the IDE.


OK. So this will be fixed in the next release of Netbeans.
In the meantime, is there a way to fix it ?


Yes, you just need to create a plain 'rake' file (without any
extensions) in C:/opt/ruby-1.9.1-mingw/bin. Best to just create a
stripped down version of the rake.bat file you have -- something like I
posted earlier should work, i.e.:

begin
require 'rake'
rescue LoadError
require 'rubygems'
require 'rake'
end
Rake.application.run

HTH,
Erno
Back to top
Chauk-Mean
Posted via mailing list.





PostPosted: Thu Mar 05, 2009 8:44 pm    Post subject: Various problems for running Ruby-1.9.1 and JRuby with 1.9 support Reply with quote

Quote:
Erno Mononen wrote:
Yes, you just need to create a plain 'rake' file (without any
extensions) in C:/opt/ruby-1.9.1-mingw/bin. Best to just create a
stripped down version of the rake.bat file you have -- something like I
posted earlier should work, i.e.:

Quote:
begin
require 'rake'
rescue LoadError
require 'rubygems'
require 'rake'
end
Rake.application.run

This works. Thanks.

Chauk-Mean.

--
View this message in context: http://www.nabble.com/Various-problems-for-running-Ruby-1.9.1-and-JRuby-with-1.9-support-tp22249585p22360253.html
Sent from the NetBeans Ruby Users mailing list archive at Nabble.com.
Back to top
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