Thursday, September 2, 2010

[Rails] Re: rspec - bash: rspec: command not found

Thanks Chris, I'll try that now...

By the way, I get this error:

$ spec
/Library/Ruby/Site/1.8/rubygems.rb:335:in `bin_path': can't find
executable spec for rspec-2.0.0.beta.18 (Gem::Exception)
from /usr/bin/spec:19


Is there a PATH config option somewhere?


On Sep 1, 11:04 pm, Chris Mear <chrism...@gmail.com> wrote:
> On 30 August 2010 04:30, nobosh <bhellm...@gmail.com> wrote:
>
> > Hello, I'm going through the Rails 3 book (which is awesome by the
> > way) here:http://railstutorial.org/chapters/static-pages#top
>
> > In the book it has me using "rspec" which is installed:
> > bundle show rspec
> > /Library/Ruby/Gems/1.8/gems/rspec-2.0.0.beta.18
>
> > But when I go to run the test, "rspec spec/" I get "-bash: rspec:
> > command not found"
>
> > Did I miss a step? thxs!
>
> As you've installed your gems with Bundler, try this instead:
>
> bundle exec rspec spec
>
> Bundler doesn't necessarily install gems in the standard location,
> which is possibly why the rspec executable isn't in your $PATH (which
> is why you got the 'command not found' error). Either way, when you're
> using Bundler, you almost always want to run Ruby commands in the
> context of the bundle, which is what bundle exec does.
>
> Chris

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate