6

I used the thoughtbot laptop script to setup a new Macbook Air (OSX 10.10.5), but when I navigate within a Rails project that contains a .ruby-version file, running commands such as rails s returns an errors of: Your Ruby version is 2.0.0, but your Gemfile specified 2.2.3.

Running rbenv local within the same directory gives the correct version of 2.2.3.

I'm running the commands in zsh with the following .zshrc:

export PATH="$HOME/.bin:$PATH"
eval "$(rbenv init - --no-rehash zsh)"

# recommended by brew doctor
export PATH="/usr/local/bin:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

I just want to be able to run the Rails app locally and will use something other than rbenv for Ruby version management if need be.

  • Have you got ruby installed via Homebrew as well as rails (i.e. how did you install rails) – Mark Sep 9 '15 at 18:47
  • 1
    Neither ruby or rails show up with brew list, but rbenv and ruby-build do. – Jayson Virissimo Sep 9 '15 at 21:13
  • You likely are, but are you prefixing your commands with bundle? E.g. bundle install, bundle rails s, etc? – chrismanderson Feb 4 '16 at 1:28

You must log in to answer this question.

Browse other questions tagged .