After completing the Rails Tutorial I wanted to extend it into a personal app so I created another directory and moved/copied all the files from tutorialFolder to appFolder.
However I'm encountering some problems when I try to setup the gems again.
bundle install
returns:
An error occurred while installing pg (0.17.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.1'` succeeds before bundling.
So I try gem install pg -v '0.17.1
(or bundle update
) and get:
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Searching StackOverflow I discover Installing gem or updating RubyGems fails with permissions error
Which explains that /Library/Ruby/Gems/2.0.0
That is the version of Ruby installed by Apple, for their own use. While it's OK to make minor modifications to that if you know what you're doing, because you are not sure about the permissions problem, I'd say it's not a good idea to continue along that track.
To avoid the above I try brew install ruby
succesfully but get stuck on bundle install
I can't retrace where, but I also attempted to remove the Gemfile.lock but that didn't do anything.
Additional info: ruby -v
>>> ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
rails -v
>>> bin/spring:10:in 'read': No such file or directory - /Gemfile.lock (Errno::ENOENT)
Thanks,
Aucun commentaire:
Enregistrer un commentaire