Quantcast

Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Frank Burleigh

I'm new to NB, and ruby/rails is probably my fifth language.  Problems are likely. ;-)

I used rvm to get ruby 1.9.2-head and to make an rvm gemset for rails 3 beta4 on OS X.  NB is 6.9.1 nightly.

I used NB to make a new rails 3 beta4 application.  At a command line I can:

rails server

to start webrick and see the app in a browser.

But in NB I can't run or debug the application.  I also cannot open a Rails Console.  In every case the Ruby interpreter seems to say some variant of "no such directory: script", e.g.:

/Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)

So it looks to me like NB doesn't know what to do with rails 3 beta4.

Is there anything I can do about that?





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Erno Mononen

Hello,

seems that for some reason the IDE doesn't recognize the Rails version
correctly; might have to do with the rvm setup. When you create a new
rails app, do you see beta4 in the Rails version combo box on the last
page of the new Rails app wizard? Or when you go to Tools | Ruby Gems
and choose the ruby 1.9.2-head platform, is beta4 visible there?

Erno


On 07/23/2010 03:46 PM, fburleigh wrote:

> I'm new to NB, and ruby/rails is probably my fifth language.  Problems are likely. ;-)
>
> I used rvm to get ruby 1.9.2-head and to make an rvm gemset for rails 3 beta4 on OS X.  NB is 6.9.1 nightly.
>
> I used NB to make a new rails 3 beta4 application.  At a command line I can:
>
> rails server
>
> to start webrick and see the app in a browser.
>
> But in NB I can't run or debug the application.  I also cannot open a Rails Console.  In every case the Ruby interpreter seems to say some variant of "no such directory: script", e.g.:
>
> /Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)
>
> So it looks to me like NB doesn't know what to do with rails 3 beta4.
>
> Is there anything I can do about that?
>
>
>
>
>
>    

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Frank Burleigh
In reply to this post by Frank Burleigh


Erno Mononen wrote:

> Hello,
>
> seems that for some reason the IDE doesn't recognize the Rails version
> correctly; might have to do with the rvm setup. When you create a new
> rails app, do you see beta4 in the Rails version combo box on the last
> page of the new Rails app wizard? Or when you go to Tools | Ruby Gems
> and choose the ruby 1.9.2-head platform, is beta4 visible there?
>
> Erno
>


Thanks for your reply, Erno.

I made a new rails app. The platform reads "1.9.2 p-1" with the rails dropdown list showing only "rails 3 beta4."  The gems and paths look correct.  Still, Run in the IDE produces the same:

/Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)

The script directory has one file -- "rails" -- with this content:

#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.

APP_PATH = File.expand_path('../..config/application',  __FILE__)
require File.expand_path('../..config/boot',  __FILE__)
require 'rails/commands'

I note that "../../config" seems to include one too many ascents to reach the config directory, if that's what's being done.  In the IDE's irb I can run "require 'rails/commands'" to get a "true" result.

rvm is said to be all the rage right now.  A GUI app on OS X can be excused for not seeing rvm's results, since the path magic is done in a script rather than text.  Without know more how NB gets its info, it's hard to say much.  I will just say that the paths for ruby and gems looks correct to me.  I do not however see where NB gets the "rails" command's path.

So I'm stuck and somewhat frustrated, but hopeful.





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Frank Burleigh
In reply to this post by Frank Burleigh


fburleigh wrote:

>
> Erno Mononen wrote:
> > Hello,
> >
> > seems that for some reason the IDE doesn't recognize the Rails version
> > correctly; might have to do with the rvm setup. When you create a new
> > rails app, do you see beta4 in the Rails version combo box on the last
> > page of the new Rails app wizard? Or when you go to Tools | Ruby Gems
> > and choose the ruby 1.9.2-head platform, is beta4 visible there?
> >
> > Erno
> >
>
>
> Thanks for your reply, Erno.
>
> I made a new rails app. The platform reads "1.9.2 p-1" with the rails dropdown list showing only "rails 3 beta4."  The gems and paths look correct.  Still, Run in the IDE produces the same:
>
> /Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)
>
> *snip*
>
>


I can't quite say how, but I've been successful integrating rvm and NetBeans 6.9.1.  Here's what I did:

* use rvm to uninstall getsets for rails3beta4.
* remove rvm (including ~/.rvm, where ruby 1.9.2-head lived)
* rm -rf ~/.gem (very little in there)
* install rvm according to documentation
* create a gemset for rails 3 rc1
* run rvm 1.9.2-head@rails3rc1 (there's a complaint)
* gem install rails --pre (to get rails 3 rc1)
* open netbeans, use Tools -> Ruby platforms, autodetect (it sees 1.9.2-head)
* Now adjust the rvm ruby's platform so that home and get home and paths are within ~/.rvm/gems.  Mnaully typing ~/.rvm into the browse window help netbeans get to the right stuff.

Interpreter:
~/.rvm/rubies/ruby-1.9.2-head/bin/ruby

Gem home:
~/.rvm/gems/ruby-1.9.2-head@rails3rc1

Gem paths:
~/.rvm/gems/ruby-1.9.2-head@rails3rc1
~/.rvm/gems/ruby-1.9.2-head@global





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Anthony Richardson-3
In reply to this post by Frank Burleigh
I have the same problem, I'm not using RVM. As far as I can tell Netbeans is trying to use the old Rails scripts instead of the new rails 3 script

old:

script/server

new

rails s

cheers

Anthony Richardson

On Fri, Jul 23, 2010 at 11:16 PM, fburleigh <[hidden email]> wrote:

I'm new to NB, and ruby/rails is probably my fifth language.  Problems are likely. ;-)

I used rvm to get ruby 1.9.2-head and to make an rvm gemset for rails 3 beta4 on OS X.  NB is 6.9.1 nightly.

I used NB to make a new rails 3 beta4 application.  At a command line I can:

rails server

to start webrick and see the app in a browser.

But in NB I can't run or debug the application.  I also cannot open a Rails Console.  In every case the Ruby interpreter seems to say some variant of "no such directory: script", e.g.:

/Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)

So it looks to me like NB doesn't know what to do with rails 3 beta4.

Is there anything I can do about that?






Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Erno Mononen

I took a quick look at this, apparently there is an issue with the code that should make the IDE use the new rails 3 script when using any of the Rails 3 releases. It should work with Rails 3 final whenever it is released, but that may be of little comfort. Things are changing pretty fast now in the Rails world with the new Rails 3 releases and since as of late I've been busy with other things I'm not really keeping up with all the changes. So your feedback is much appreciated. I'm attaching here a patched .jar file (hopefully it comes through to the list) to fix this particular issue, just copy it to

<nb_install_dir>/ruby/modules

and restart the IDE. Should work both with 6.9 and 6.9.1 nightly builds (and also with trunk nightly builds).

Let me know how that works for you, if there are no problems I'll push it to 6.9.1 too (if it's not frozen yet, have to find out).

Thanks,
Erno

On 07/28/2010 07:12 AM, Anthony Richardson wrote:
I have the same problem, I'm not using RVM. As far as I can tell Netbeans is trying to use the old Rails scripts instead of the new rails 3 script

old:

script/server

new

rails s

cheers

Anthony Richardson

On Fri, Jul 23, 2010 at 11:16 PM, fburleigh <[hidden email]> wrote:

I'm new to NB, and ruby/rails is probably my fifth language.  Problems are likely. ;-)

I used rvm to get ruby 1.9.2-head and to make an rvm gemset for rails 3 beta4 on OS X.  NB is 6.9.1 nightly.

I used NB to make a new rails 3 beta4 application.  At a command line I can:

rails server

to start webrick and see the app in a browser.

But in NB I can't run or debug the application.  I also cannot open a Rails Console.  In every case the Ruby interpreter seems to say some variant of "no such directory: script", e.g.:

/Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)

So it looks to me like NB doesn't know what to do with rails 3 beta4.

Is there anything I can do about that?








org-netbeans-modules-ruby-railsprojects.jar (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Erno Mononen

OK, so of course the attachment didn't come through. I've uploaded it to

http://wiki.netbeans.org/wiki/images/b/bf/Org-netbeans-modules-ruby-railsprojects.jar

Please make sure you save it as org-netbeans-modules-ruby-railsprojects.jar (starting with lower case 'o'), the wiki didn't allow me to change the destination file name.

Erno


On 07/28/2010 10:29 AM, Erno Mononen wrote:

I took a quick look at this, apparently there is an issue with the code that should make the IDE use the new rails 3 script when using any of the Rails 3 releases. It should work with Rails 3 final whenever it is released, but that may be of little comfort. Things are changing pretty fast now in the Rails world with the new Rails 3 releases and since as of late I've been busy with other things I'm not really keeping up with all the changes. So your feedback is much appreciated. I'm attaching here a patched .jar file (hopefully it comes through to the list) to fix this particular issue, just copy it to

<nb_install_dir>/ruby/modules

and restart the IDE. Should work both with 6.9 and 6.9.1 nightly builds (and also with trunk nightly builds).

Let me know how that works for you, if there are no problems I'll push it to 6.9.1 too (if it's not frozen yet, have to find out).

Thanks,
Erno

On 07/28/2010 07:12 AM, Anthony Richardson wrote:
I have the same problem, I'm not using RVM. As far as I can tell Netbeans is trying to use the old Rails scripts instead of the new rails 3 script

old:

script/server

new

rails s

cheers

Anthony Richardson

On Fri, Jul 23, 2010 at 11:16 PM, fburleigh <[hidden email]> wrote:

I'm new to NB, and ruby/rails is probably my fifth language.  Problems are likely. ;-)

I used rvm to get ruby 1.9.2-head and to make an rvm gemset for rails 3 beta4 on OS X.  NB is 6.9.1 nightly.

I used NB to make a new rails 3 beta4 application.  At a command line I can:

rails server

to start webrick and see the app in a browser.

But in NB I can't run or debug the application.  I also cannot open a Rails Console.  In every case the Ruby interpreter seems to say some variant of "no such directory: script", e.g.:

/Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)

So it looks to me like NB doesn't know what to do with rails 3 beta4.

Is there anything I can do about that?








Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Anthony Richardson-3
Hi Erno,

That patched jar works fine on my Ubuntu 10.04 install running a NetBeans nightly and Rails 3.0.0.rc.

No problems starting server both with and without debugging.

Cheers,

Anthony

On Wed, Jul 28, 2010 at 6:15 PM, Erno Mononen <[hidden email]> wrote:

OK, so of course the attachment didn't come through. I've uploaded it to

http://wiki.netbeans.org/wiki/images/b/bf/Org-netbeans-modules-ruby-railsprojects.jar

Please make sure you save it as org-netbeans-modules-ruby-railsprojects.jar (starting with lower case 'o'), the wiki didn't allow me to change the destination file name.

Erno



On 07/28/2010 10:29 AM, Erno Mononen wrote:

I took a quick look at this, apparently there is an issue with the code that should make the IDE use the new rails 3 script when using any of the Rails 3 releases. It should work with Rails 3 final whenever it is released, but that may be of little comfort. Things are changing pretty fast now in the Rails world with the new Rails 3 releases and since as of late I've been busy with other things I'm not really keeping up with all the changes. So your feedback is much appreciated. I'm attaching here a patched .jar file (hopefully it comes through to the list) to fix this particular issue, just copy it to

<nb_install_dir>/ruby/modules

and restart the IDE. Should work both with 6.9 and 6.9.1 nightly builds (and also with trunk nightly builds).

Let me know how that works for you, if there are no problems I'll push it to 6.9.1 too (if it's not frozen yet, have to find out).

Thanks,
Erno

On 07/28/2010 07:12 AM, Anthony Richardson wrote:
I have the same problem, I'm not using RVM. As far as I can tell Netbeans is trying to use the old Rails scripts instead of the new rails 3 script

old:

script/server

new

rails s

cheers

Anthony Richardson

On Fri, Jul 23, 2010 at 11:16 PM, fburleigh <[hidden email]> wrote:

I'm new to NB, and ruby/rails is probably my fifth language.  Problems are likely. ;-)

I used rvm to get ruby 1.9.2-head and to make an rvm gemset for rails 3 beta4 on OS X.  NB is 6.9.1 nightly.

I used NB to make a new rails 3 beta4 application.  At a command line I can:

rails server

to start webrick and see the app in a browser.

But in NB I can't run or debug the application.  I also cannot open a Rails Console.  In every case the Ruby interpreter seems to say some variant of "no such directory: script", e.g.:

/Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)

So it looks to me like NB doesn't know what to do with rails 3 beta4.

Is there anything I can do about that?









Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta

Erno Mononen

Thanks Anthony for testing this! I was playing with this a bit and found out that 6.9.1 should work with 3.0.0.rc even w/o the patched .jar, but with 3.0.0.beta4 neither 6.9 or 6.9.1 work w/o the patch.

Thanks,
Erno

On 07/29/2010 04:28 AM, Anthony Richardson wrote:
Hi Erno,

That patched jar works fine on my Ubuntu 10.04 install running a NetBeans nightly and Rails 3.0.0.rc.

No problems starting server both with and without debugging.

Cheers,

Anthony

On Wed, Jul 28, 2010 at 6:15 PM, Erno Mononen <[hidden email]> wrote:

OK, so of course the attachment didn't come through. I've uploaded it to

http://wiki.netbeans.org/wiki/images/b/bf/Org-netbeans-modules-ruby-railsprojects.jar

Please make sure you save it as org-netbeans-modules-ruby-railsprojects.jar (starting with lower case 'o'), the wiki didn't allow me to change the destination file name.

Erno



On 07/28/2010 10:29 AM, Erno Mononen wrote:

I took a quick look at this, apparently there is an issue with the code that should make the IDE use the new rails 3 script when using any of the Rails 3 releases. It should work with Rails 3 final whenever it is released, but that may be of little comfort. Things are changing pretty fast now in the Rails world with the new Rails 3 releases and since as of late I've been busy with other things I'm not really keeping up with all the changes. So your feedback is much appreciated. I'm attaching here a patched .jar file (hopefully it comes through to the list) to fix this particular issue, just copy it to

<nb_install_dir>/ruby/modules

and restart the IDE. Should work both with 6.9 and 6.9.1 nightly builds (and also with trunk nightly builds).

Let me know how that works for you, if there are no problems I'll push it to 6.9.1 too (if it's not frozen yet, have to find out).

Thanks,
Erno

On 07/28/2010 07:12 AM, Anthony Richardson wrote:
I have the same problem, I'm not using RVM. As far as I can tell Netbeans is trying to use the old Rails scripts instead of the new rails 3 script

old:

script/server

new

rails s

cheers

Anthony Richardson

On Fri, Jul 23, 2010 at 11:16 PM, fburleigh <[hidden email]> wrote:

I'm new to NB, and ruby/rails is probably my fifth language.  Problems are likely. ;-)

I used rvm to get ruby 1.9.2-head and to make an rvm gemset for rails 3 beta4 on OS X.  NB is 6.9.1 nightly.

I used NB to make a new rails 3 beta4 application.  At a command line I can:

rails server

to start webrick and see the app in a browser.

But in NB I can't run or debug the application.  I also cannot open a Rails Console.  In every case the Ruby interpreter seems to say some variant of "no such directory: script", e.g.:

/Users/burleigh/.rvm/rubies/ruby-1.9.2-head/bin/ruby: No such file or directory -- script/server (LoadError)

So it looks to me like NB doesn't know what to do with rails 3 beta4.

Is there anything I can do about that?










Loading...