0

Since OSX 10.9, I'm not able any more to push my rails app zu heroku.

Heroku gives the following error:

  Failed to install gems via Bundler.  
  Push rejected, failed to compile Ruby app

When I "bundle install", then I get the error:

Installing pg (0.17.0) 
Errno::EACCES: Permission denied - /Users/USERNAME/.rvm/gems/ruby-1.9.3-p385/gems/pg-0.17.0/.gemtest
An error occurred while installing pg (0.17.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.0'` succeeds before bundling.

And gem install pg -v '0.17.0':

ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Users/USERNAME/.rvm/gems/ruby-1.9.3-p385/gems/pg-0.17.0/.gemtest

I tried to install pg via brew, but this doesn't work, too.

Can anyone help me?

CDub
  • 13,146
  • 4
  • 51
  • 68
Adrian
  • 524
  • 5
  • 21
  • 1
    @NickM He is using RVM, you can tell by the path. Seems like some permissions got screwed up in the update. Can you try `sudo -u USERNAME bundle install` – Max Nov 18 '13 at 19:56
  • then i get the output: /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'bundler' (>= 0) among 9 total gem(s) (Gem::LoadError) from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem' from /Users/USER/.rvm/gems/ruby-1.9.3-p385/bin/bundle:18:in `
    ' from /Users/USER/.rvm/gems/ruby-1.9.3-p385/bin/ruby_executable_hooks:15:in `eval' from /Users/USER/.rvm/gems/ruby-1.9.3-p385/bin/ruby_executable_hooks:15:in
    – Adrian Nov 18 '13 at 20:05
  • Maybe this question will help? http://stackoverflow.com/questions/19539303/troubles-with-rails-and-postgres-after-updating-to-os-x-10-9-mavericks – DiegoSalazar Nov 18 '13 at 23:18
  • Hi, I didn't get it completely: Do you have problems while deploying to Heroku or on your local machine. I don't believe that there's a /Users/USERNAME on Heroku perhaps therefore you receive the "permission denied"? – fenton Nov 18 '13 at 23:34
  • @diego.greyrobot I tried that. the result looks like: http://j.mp/I2jAaw ; fenton I can't bundle locally - so I can't push it on heroku.. – Adrian Nov 19 '13 at 08:11
  • now i was able to update brew and install apple-gcc42. now bundle install runs through, but still: 'Gems in the group pg were not installed.' > 'ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/USER/.rvm/gems/ruby-1.9.3-p385/gems/pg-0.17.0/.gemtest'. How can i fix that? – Adrian Nov 19 '13 at 08:42

1 Answers1

0

did you try to update your gems?
sudo gem update --system --no-user-install

Tal
  • 7,827
  • 6
  • 38
  • 61
  • no this doesn't help. Heroku push still tells me: Bundler Output: You are trying to install in deployment mode after changing your Gemfile. Run `bundle install` elsewhere and add the updated Gemfile.lock to version control. After bundle install: Your bundle is complete! Gems in the group pg were not installed. But I can install it with "gem install pg" – Adrian Nov 19 '13 at 17:36
  • Adrian - did you make sure that after bundle you committed and pushed both Gemfile and Gemfile.lock? Nizam - right. I'm new here so thx for the feedback :) – Tal Nov 20 '13 at 17:29