WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
/usr/bin aren’t both writable.
WARNING: You don’t have /Users/nicolefreed/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
ERROR: Error installing bundler:
bundler requires RubyGems version >= 1.3.6
I’ve just installed the proper version of Rails (twice, actually) for my OS, which is 10.6.8 (don’t ask why I’m using an older system, and no, I can’t update at this time ), so I don’t understand why the Bundler installer is telling me I don’t have the proper components in the proper places, when I’ve supposedly just installed them?
I tried the command sudo gem install gemname literally, and got ERROR: could not find gem gemname locally or in a repository, so I assume “gemname” refers to the actual names of the gems (are these libraries?) I need to install. I have no idea which ones I’m supposed to install, so I asked for a list.
How do I search for hidden files? I’ve tried listing the contents of my home directory, and again, no such file.
Upgrading your OS to the latest is always the first step, why can’t you upgrade?
bundler is the gem you mentioned you were trying to install/use.
Bundler runs through a file named ‘Gemfile’ in the root of your rails projects and installs all the gems(libraries) listed there.
sudo gem install bundler
bundle install
But before you do any of that you may as well get a new version of Ruby installed so you’re up to date. Install rbenv to manage Ruby installations https://github.com/sstephenson/rbenv and ruby 2.1.3(that latest version currently supported by Heroku)
The rbenv Readme has info you should read about how PATH works.
bundler is the gem you mentioned you were trying to install/use.
Bundler runs through a file named ‘Gemfile’ in the root of your rails projects
and installs all the gems(libraries) listed there.
Oh, I see. Thanks.
But before you do any of that you may as well get a new version of Ruby installed so you’re up to date. Install rbenv to manage Ruby installations https://github.com/sstephenson/rbenv and ruby 2.1.3(that latest version currently supported by Heroku)
The rbenv Readme has info you should read about how PATH works.
Okey-doke. Let’s see how this goes…
Anyone know if the Python/Django install on Heroku is any easier? I could probably use Django just as easily for what I want to do, and it might be less of a headache.
So I’ve installed rbenv and ruby-build using Homebrew, per Stephenson’s instructions for Mac OSX. However, there’s a bit at the end that I don’t understand:
Afterwards you’ll still need to add eval "$(rbenv init -)" to your profile as stated in the caveats. You’ll only ever have to do this once.
I’ve found information online on creating editing the .bash_profile, but I’m not sure exactly what to do with it. Do I simply create/open a new .bash_profile file, copy and paste the above command, and then save it?
So, @markbrown4 and @James_Hibbard , I’ve installed rbenv and ruby-build using Homebrew, and added the eval “$(rbenv init -)” and PATH commands to my .bash_profile, but I still get the error message
ERROR: Error installing bundler:
bundler requires RubyGems version >= 1.3.6
I haven’t set the version of Ruby to global (no idea how to do this), updated bundler (haven’t been able to install it, per the error message above), or run rbenv rehash (no idea how to do this). I have no idea what I’m doing; I’ve just been following the instructions in the heroku install, as well as the instructions of folks here when I run into errors or problems. Please advise next steps.
If you haven’t ever tried Rails or Django you shouldn’t expect to be able to deploy them to Heroku. There’s always a little bit of work getting a development environment setup the first time and each stack it’s own quirks. Maybe you should just be thinking of getting your app working locally before worrying about deploying it to Heroku.
Read the rbenv readme to understand what it’s doing, here’s a cheat sheet where “<version>” is a ruby version number like “1.9.3-p392”
# install/uninstall a Ruby version
rbenv install <version>
rbenv uninstall <version>
# list all/current Ruby versions
rbenv versions
rbenv version
# set a version of Ruby to use globally/local to a directory
rbenv global <version>
rbenv local <version>
# reload executable commands after an install like rails or bundle
rbenv rehash
Sigh. I was really hoping this would be like installing WordPress. Apparently not. However, getting “my” app working locally would defeat the purpose of this exercise, which is to deploy New Relic in a hosted open-source app so I can get a free Learnable subscription. So I don’t really have a choice here, unless I want to turn my Mac into a web server, which I understand is a whole heck of a lot more complex than this.