I installed rspec on Linux Ubuntu 10.04, but no command ''rspec'' is found. Perhaps the PATH is wrong. What is the correct search path? The following was copied from my terminal. Thank you for taking a look: ~$ sudo gem install rspec --version 2.0.0 ~$ gem list --local *** LOCAL GEMS *** rspec (2.0.0) ~$ ls /var/lib/gems/1.8/gems rspec-2.0.0 ~$ printenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games ~$ export PATH=$PATH:/var/lib/gems/1.8/ ~$ printenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/ ~$ 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 -- Posted via http://www.ruby-forum.com/.
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 01/20/2011 03:51 PM, wolf volpi wrote:> I installed rspec on Linux Ubuntu 10.04, but no command ''rspec'' is > found. Perhaps the PATH is wrong. What is the correct search path? > The following was copied from my terminal. Thank you for taking a look: > > ~$ sudo gem install rspec --version 2.0.0 > > ~$ gem list --local > > *** LOCAL GEMS *** > > rspec (2.0.0) > ~$ ls /var/lib/gems/1.8/gems > rspec-2.0.0 > ~$ printenv PATH > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games > ~$ export PATH=$PATH:/var/lib/gems/1.8/ > ~$ printenv PATH > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/ > ~$ 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 >
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 -- Posted via http://www.ruby-forum.com/.
On Thu, Jan 20, 2011 at 6:51 PM, wolf volpi <lists at ruby-forum.com> wrote:> I installed rspec on Linux Ubuntu 10.04, but no command ''rspec'' is > found. ?Perhaps the PATH is wrong. ?What is the correct search path? > The following was copied from my terminal. ?Thank you for taking a look: > > ~$ sudo gem install rspec --version 2.0.0 > > ~$ gem list --local > > *** LOCAL GEMS *** > > 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 Lavena 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-Exup?ry
Thanks Luis. I uninstaled rubygems1.8 and reinstalled rubygems1.8 and rspec. This time it worked. I installed 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] -- Posted via http://www.ruby-forum.com/.