#33 √ invalid
bigjimmyk3

Can't use rake tasks from rails when installed as gem

Reported by bigjimmyk3 | June 16th, 2009 @ 12:14 PM

I am attempting to use friendly_id in my rails project as a gem, but I am having trouble getting the lib-specific rake tasks to appear in my 'rake --tasks' list (it goes without saying that this means I can't run them from within the project). The friendly_id docs state that gem installation is the preferred method of operation so I'd like to do it the right way. However, I also need a convenient method for cleaning out / regenerating slugs. I have spent some time researching this using goog but no one seems to have a good solution. Is there a trick you use for getting the friendly_id:* tasks rake-accessible?

I'm using Ruby 1.8x, rails 2.3.2, and friendly_id 2.1.3.

Comments and changes to this ticket

  • Norman Clarke

    Norman Clarke June 16th, 2009 @ 12:14 PM

    • → State changed from “new” to “invalid”

    Running

    ./script/generate friendly_id

    will install the rake tasks in your project's tasks directory.

    It will also generate a migration to create the slugs table. If you don't want to use slugs, simply delete the migration file after running the generator.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Friendly_id is a plugin for Ruby on Rails which allows you to work with human-friendly strings as well as numeric ids in ActiveRecord models.

People watching this ticket

Tags

You can update this ticket by sending an email to from your email client. (help)