-1

I am using the friendly_id gem to make my url friendly & replace id by username in the url for example. Everything works fine under development, because I was about to run (to update currents users url):

User.find_each(&:save) in my rails c.

But in production mode, on heroku, It works only with new users - How can I add the friendly_id models to existing users ?

I tried to run

Heroku run rake Pin.find_each(&:save)

But without success:

-bash: syntax error near unexpected token `('

Any ideas how I can fix this?

1 Answers1

0

Inside your application directory:

heroku run console

And then:

Pin.find_each(&:save)
scaryguy
  • 7,720
  • 3
  • 36
  • 52