Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8887615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:51:11+00:00 2026-06-14T21:51:11+00:00

I’m currently going through Michael Hartl’s RoR tutorial and am stuck on Chapter 3

  • 0

I’m currently going through Michael Hartl’s RoR tutorial and am stuck on Chapter 3 when trying to run Spork and Guard. When trying to run tests I get:

/bin/sh: rspec: command not found

Yes, I did look around for an answer but I don’t see where the RubyTest.sublime.settings file is so I don’t know how to edit it. Can anyone help me out on how to fix my error?

this is my Rubytest.sublime.settings file in my user fodler

{
  "erb_verify_command": "bundle exec erb -xT - {file_name} | ruby -c",
  "ruby_verify_command": "bundle exec ruby -c {file_name}",

  "run_ruby_unit_command": "bundle exec ruby -Itest {relative_path}",
  "run_single_ruby_unit_command": "bundle exec ruby -Itest {relative_path} -n     '{test_name}'",

  "run_cucumber_command": "bundle exec cucumber {relative_path}",
  "run_single_cucumber_command": "bundle exec cucumber {relative_path} -l{line_number}",

  "run_rspec_command": "bundle exec rspec {relative_path}",
  "run_single_rspec_command": "bundle exec rspec {relative_path} -l{line_number}",

  "ruby_unit_folder": "test",
  "ruby_cucumber_folder": "features",
  "ruby_rspec_folder": "spec",

  "ruby_use_scratch" : false,
  "save_on_run": false,
  "ignored_directories": [".git", "vendor", "tmp"],

  "hide_panel": false,

  "before_callback": "",
  "after_callback": ""
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:51:12+00:00Added an answer on June 14, 2026 at 9:51 pm

    The sublime plugin is trying to run the command rspec using shell /bin/sh. However, the command is not found because RVM is not loaded in the shell’s environment.

    As such, the folder where your rspec executable is located is not in the shell’s search path (PATH environment variable). RVM installs any executable commands that come with gems to someplace like: “/home/your-user/.rvm/gems/ruby-1.9.3-p194@myproject/bin/” (actual path depending on your gemset, ruby version, and where your OS stores user home directories)

    Simple Solution

    As mentioned here… you might find that simply executing sublime from a shell environment containing RVM (ie: your project directory) may solve the PATH problem. However, this requires that you execute your text editor from the command line each time, and that the shell’s environment is preserved.

    cd ~/src/my-ruby-project
    subl .
    

    After much experimentation, I found a way to force the RubyTest plugin to execute rspec with the correct RVM-controlled environment (with bundler support).

    With Bundler Support

    Here’s the contents of my ~/.config/sublime-text-2/Packages/RubyTest/RubyTest.sublime-settings file:

    {
      "erb_verify_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/bundle exec erb -xT - {file_name} | ~/.rvm/bin/rvm-auto-ruby -c",
      "ruby_verify_command": "~/.rvm/bin/rvm-auto-ruby -c {file_name}",
    
      "run_ruby_unit_command": "~/.rvm/bin/rvm-auto-ruby -Itest {relative_path}",
      "run_single_ruby_unit_command": "~/.rvm/bin/rvm-auto-ruby -Itest {relative_path} -n '{test_name}'",
    
      "run_cucumber_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/bundle exec cucumber {relative_path}",
      "run_single_cucumber_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/bundle exec cucumber {relative_path} -l{line_number}",
    
      "run_rspec_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/bundle exec rspec {relative_path}",
      "run_single_rspec_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/bundle exec rspec {relative_path} -l{line_number}",
    
      "ruby_unit_folder": "test",
      "ruby_cucumber_folder": "features",
      "ruby_rspec_folder": "spec",
    
      "ruby_use_scratch" : false,
      "save_on_run": false,
      "ignored_directories": [".git", "vendor", "tmp"],
    
      "hide_panel": false,
    
      "before_callback": "",
      "after_callback": ""
    }
    

    This should work as long as you’ve got bundler in your global gemset, and RVM installed to your home dir (adjust paths as needed if ~/.rvm does not evaluate correctly, or if bundler or rvm-auto-ruby is located somewhere else).

    If you are using gemsets you should also add a line like the following to your project’s .rvmrc file:

    rvm use ruby-1.9.3-p327@your_project_gemset_name
    

    Without Bundler Support

    This assumes you have cucumber and rspec installed to the @global gemset of your current ruby:

    {
      "erb_verify_command": "~/.rvm/bin/rvm-exec $(~/.rvm/bin/rvm current) 1>/dev/null erb -xT - {file_name} | ~/.rvm/bin/rvm-auto-ruby -c",
      "ruby_verify_command": "~/.rvm/bin/rvm-auto-ruby -c {file_name}",
    
      "run_ruby_unit_command": "~/.rvm/bin/rvm-auto-ruby -Itest {relative_path}",
      "run_single_ruby_unit_command": "~/.rvm/bin/rvm-auto-ruby -Itest {relative_path} -n '{test_name}'",
    
      "run_cucumber_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/cucumber {relative_path}",
      "run_single_cucumber_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/cucumber {relative_path} -l{line_number}",
    
      "run_rspec_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/rspec {relative_path}",
      "run_single_rspec_command": "~/.rvm/bin/rvm-auto-ruby $(~/.rvm/bin/rvm gemdir | sed -e 's/@.*//' -e 's/$/@global/' )/bin/rspec {relative_path} -l{line_number}",
    
      "ruby_unit_folder": "test",
      "ruby_cucumber_folder": "features",
      "ruby_rspec_folder": "spec",
    
      "ruby_use_scratch" : false,
      "save_on_run": false,
      "ignored_directories": [".git", "vendor", "tmp"],
    
      "hide_panel": false,
    
      "before_callback": "",
      "after_callback": ""
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to loop through a bunch of documents I have to put
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.