NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

[Resolved] Netbeans 7.3 Rails - Rspec not working from UI

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
iburry



Joined: 24 Apr 2012
Posts: 7

PostPosted: Wed May 08, 2013 6:45 pm    Post subject: [Resolved] Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

I've installed the RoR plugin for Netbeans 7.3, and it mostly works for Rails 3.2.13 and Ruby 1.9.3, with the exception that I cannot get Rspec to run properly from within the IDE. Running it results in this:

Quote:
/Users/user.name/.rvm/rubies/ruby-1.9.3-p374/bin/ruby -S rspec ./spec/controllers/clients_controller_spec.rb
/Users/user.name/.rvm/rubies/ruby-1.9.3-p374/bin/ruby: No such file or directory -- rspec (LoadError)


Now if I run that command in a terminal, it works as expected. If I run that command with a system() call in IRB, it works as expected, but as part of the Rake task fired off by the IDE, it falls flat on its face. Has anyone else dealt successfully with this issue?[/code]


Last edited by iburry on Thu May 23, 2013 11:18 pm; edited 1 time in total
Back to top
enebo



Joined: 01 Aug 2012
Posts: 9

PostPosted: Wed May 15, 2013 5:44 pm    Post subject: Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

I take it you ran detect ruby platforms (of manually added this rvm version of 1.9.3) and associated this version with your project?
Back to top
iburry



Joined: 24 Apr 2012
Posts: 7

PostPosted: Thu May 16, 2013 11:09 pm    Post subject: Re: Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

enebo wrote:
I take it you ran detect ruby platforms (of manually added this rvm version of 1.9.3) and associated this version with your project?


Yes, when creating the project, I ran Autodetect Platforms, and chose that ruby version from the resulting list.

One other observation: When I run that command with the system() call in IRB, it succeeds, but returns false.
Back to top
enebo



Joined: 01 Aug 2012
Posts: 9

PostPosted: Fri May 17, 2013 6:26 pm    Post subject: Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

You can paste errors found in:
/Users/user.name/Library/Application Support/NetBeans/7.3/var/log/messages.log and this might possibly give you something which may help shed light in what is wrong.
Back to top
iburry



Joined: 24 Apr 2012
Posts: 7

PostPosted: Mon May 20, 2013 9:08 pm    Post subject: Re: Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

Interesting thing going on with GEM_PATH.
From Bash:

Code:
$ echo $GEM_PATH
/Users/user.name/.rvm/gems/ruby-1.9.3-p374@myproject:/Users/user.name/.rvm/gems/ruby-1.9.3-p374@global


From the IDE log:

Code:
GEM_PATH=/Users/user.name/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1:/Users/user.name/.gem/ruby/1.9.1
Back to top
j bragadeesh
Posted via mailing list.





PostPosted: Tue May 21, 2013 11:56 am    Post subject: Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

Hi,


To fix this problem launch netbeans executable from a new terminal window (bash shell) so that it will inherit all properties you'd expect it to.


Cheers!
Braga


From: iburry <address-removed>
To: address-removed; address-removed
Sent: Tuesday, 21 May 2013 2:38 AM
Subject: Netbeans 7.3 Rails - Rspec not working from UI


Interesting thing going on with GEM_PATH.
From Bash:


Code:
$ echo $GEM_PATH
/Users/user.name/.rvm/gems/ruby-1.9.3-p374@myproject ([email]ruby-1.9.3-p374@myproject[/email]):/Users/user.name/.rvm/gems/ruby-1.9.3-p374@global ([email]ruby-1.9.3-p374@global[/email])



From the IDE log:


Code:
GEM_PATH=/Users/user.name/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1:/Users/user.name/.gem/ruby/1.9.1
Back to top
iburry



Joined: 24 Apr 2012
Posts: 7

PostPosted: Thu May 23, 2013 11:17 pm    Post subject: Re: Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

I've managed to fix this problem, at least for the current project. Two changes were needed

1. Set $GEM_PATH to point to the correct gemset, instead of where Netbeans thought it should point
2. Make a code change in rake_task.rb in the run_task method. Since the system() call returns false, the code making the call needs to be:
Code:
success = !system(command)


That said, it's abysmally slow running in the IDE. It's less trouble to run it from the command line
Back to top
enebo



Joined: 01 Aug 2012
Posts: 9

PostPosted: Fri May 24, 2013 5:52 pm    Post subject: Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

When you say slow do you mean slow to startup or slow in general?


-Tom



On Thu, May 23, 2013 at 6:17 PM, iburry <address-removed ([email]address-removed[/email])> wrote:
Quote:
I've managed to fix this problem, at least for the current project. Two changes were needed

1. Set $GEM_PATH to point to the correct gemset, instead of where Netbeans thought it should point
2. Make a code change in rake_task.rb in the run_task method. Since the system() call returns false, the code making the call needs to be:

Code:
success = !system(command)



That said, it's abysmally slow running in the IDE.
Back to top
iburry



Joined: 24 Apr 2012
Posts: 7

PostPosted: Fri May 24, 2013 7:50 pm    Post subject: Re: Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

Quote:
When you say slow do you mean slow to startup or slow in general?


-Tom

Slow to start up. It takes more than 30 sec to get to where the system call is actually made.
Back to top
enebo



Joined: 01 Aug 2012
Posts: 9

PostPosted: Sun May 26, 2013 12:46 pm    Post subject: [Resolved] Netbeans 7.3 Rails - Rspec not working from UI Reply with quote

Thanks for that info.
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 cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo