Pregunta

I had problems on heroku trying to upload pictures to my app. They were uploaded to AWS but was giving an "Access Denied" error in the database.

Browsing forums I found something similar and it was fixed by giving permission to the app. Silly me, I did not write down the command, but it was something like

chown www ...

The problem is that now I apparently do not have permission to write in my app. So when I type

rake assets:precompile

it returns...

$ rake assets:precompile
/Users/sergioabendivar/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/sergioabendivar/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin/rake assets:precompile:all RAILS_ENV=production     RAILS_GROUPS=assets
rake aborted!
Permission denied

If I tried to delete manually a file from the finder it asks me for the administrator password. However if I try:

sudo rake assets:precompile

returns

.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:316:in `bin_path': can't find gem rake ([">= 0"]) with executable rake (Gem::GemNotFoundException)

I am sure it has something to do something with chown or chmod. But I have no clue what to do...

¿Fue útil?

Solución

Try navigating to your application root folder and doing

sudo chown <username> .

Otros consejos

You can try

sudo bundle exec rake assets:precompile
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top