No command 'rspec' found

What directory is rspec in?

Other posts refer to /var/lib/gems/1.8/bin, but my
install does not have the “bin”:

~$ ls /var/lib/gems/1.8/
cache doc gems specifications

Thanks.

Make sure that version 1 of rspec is NOT installed!

Here is my path:

/home/rich/.gem/ruby/1.8:/var/lib/gems/1.8:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

On Thu, Jan 20, 2011 at 6:51 PM, wolf volpi [email protected]
wrote:

rspec (2.0.0)
So rspec is the only gem you obtain?

What version of RubyGems do you have?

Asking this because when I install rspec I get 3 more gems:

https://rubygems.org/gems/rspec/versions/2.0.0

rspec-mocks = 2.0.0
rspec-expectations = 2.0.0
rspec-core = 2.0.0

Inside rspec-core is rspec command.

Also, since you’re using Ubuntu, you need to have
/var/lib/gems/1.8/bin added to the PATH.

Please check the above and let us know.


Luis L.
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupry

Thanks Luis. I uninstaled rubygems1.8 and reinstalled rubygems1.8 and
rspec. This time it worked.

Here is how I did the installed. Install rubygems1.8 from the Ubuntu
Software Center. Then from the terminal:

gem install rspec -v 2.0.0
WARNING: Installing to ~/.gem since /var/lib/gems/1.8 and
/var/lib/gems/1.8/bin aren’t both writable.
WARNING: You don’t have /home/wolf/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.


Thank you for installing rspec-core-2.0.0

Please be sure to look at Upgrade.markdown to see what might have
changed
since the last release.


Successfully installed diff-lcs-1.1.2
Successfully installed rspec-core-2.0.0
Successfully installed rspec-expectations-2.0.0
Successfully installed rspec-mocks-2.0.0
Successfully installed rspec-2.0.0
5 gems installed
Installing ri documentation for diff-lcs-1.1.2…
Installing ri documentation for rspec-core-2.0.0…
Installing ri documentation for rspec-expectations-2.0.0…
Installing ri documentation for rspec-mocks-2.0.0…
Installing ri documentation for rspec-2.0.0…
Installing RDoc documentation for diff-lcs-1.1.2…
Installing RDoc documentation for rspec-core-2.0.0…
Installing RDoc documentation for rspec-expectations-2.0.0…
Installing RDoc documentation for rspec-mocks-2.0.0…
Installing RDoc documentation for rspec-2.0.0…

~$ rspec --help
No command ‘rspec’ found, did you mean:
Command ‘spec’ from package ‘librspec-ruby1.8’ (universe)
Command ‘tspec’ from package ‘tendra’ (universe)
rspec: command not found

~$ printenv PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

~$ export PATH=$PATH:/home/wolf/.gem/ruby/1.8/bin

~$ rspec --help
Usage: rspec [options] [files or directories]

Thanks Richard. Adding the home .gem/ruby/1.8 path did not help. I
have rspec version 2 installed. How do I make sure version 1 is not
installed?

Here is a copy&paste from my terminal:

~$ printenv PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wolf/.gem/ruby/1.8
~$ ls -a /home/wolf/.gem/ruby/1.8
. … cache doc gems specifications
~$ gem list --local

*** LOCAL GEMS ***

rspec (2.0.0)
~$ rspec --help
No command ‘rspec’ found, did you mean:
Command ‘spec’ from package ‘librspec-ruby1.8’ (universe)
Command ‘tspec’ from package ‘tendra’ (universe)
rspec: command not found