Accidental Technologist

Musings about Entrepreneurship, Technology and Software Development

  • Home
  • About
  • Still River Software
  • Privacy Policy

Powered by Genesis

You are here: Home / Ruby / Strange Restful_Authentication Plugin Issue

Strange Restful_Authentication Plugin Issue

May 15, 2009 by Rob Bazinet 12 Comments

Tweet

I was working late last night trying to get a new user interface design implemented on one of my Ruby on Rails applications while at the same time getting an initial authentication bit done using Rick Olson?s awesome restful_authentication plugin.

I had some migration updates so I can the usual:

cap deploy:migrations

During the stream of text output by Capistrano I received an error:

uninitialized constant User::Authentication

My initial thought was that I must have missed some configuration setting on my server, but after looking around for a bit I could not find what I might have left off. The error indicated with was something to do with the restful_authentication plugin but testing in both development and production worked fine (of course).

Some searching around the web revealed a few suggestions ranging from making sure the restful_authentication directory contained an underscore and not a hyphen to various Rails versioning issues.  This application was working just fine on Rails 2.2.2 in development so I was confident it was not the issue.

I finally came upon a post by Brent Collier of Intridea who had the same issue as I experienced.  I had installed this plugin as I do with other plugins hosted on Github with the command script/plugin install git://github.com/technoweenie/restful-authentication.git.  The plugin installed this way is a local git repository from the one stored on Github.  Taken from Brent?s blog, the way the restful_authentication plugin appears in the Github repository was the same as was appearing in mine:

github-brent

The solution I needed to do was a bit different than the one described by Brent but close.

  1. Started off by deleting the vendor/plugin/restful_authentication directory manually.
  2. Did a commit/push of my project to Github and verified the folder was gone in the Github repo.
  3. I downloaded the tarball of the restful_authentication plugin from Github. 
  4. Once extracted, I copied the folder to vendor/plugins and named the folder restful_authentication.
  5. Did a commit/push again to Github and looked at the folder in the repo to see if it looked like all the others.  Indeed it did.
  6. Finally, ran cap deploy:migrations and all was good.

This was a very strange exercise and I would really like to know why this happened and the proper procedure to manage plugins which are a git repo themselves.  If anyone has an explanation and fix, I will update this post to reflect it.

Technorati Tags: restful_authentication,Rails,Plugin,GitHub

Share this:

  • LinkedIn
  • Twitter
  • Facebook
  • Email
  • More
  • Pinterest
  • Tumblr
  • Pocket
  • Reddit

Related

Filed Under: Ruby

Care about your privacy? I do and use Fathom Analytics on this site.

Fathom Analytics

Recent Posts

  • Status Bar in iTerm2
  • Supporting Multiple SSH Keys on macOS
  • Using the Microsoft Ergonomic Keyboard on macOS
  • 10 Steps to Survive Working from Home
  • “Are you building a business or learning a stack?”

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • I unsubscribe from blogs that only show me a tiny part of the post and force me to visit the site.
    about 4 days ago
  • If anyone is looking for a seasoned .NET, C# and https://t.co/q7WzxhZnCZ developer, a good friend of mine has some… https://t.co/5DqXtCzySr
    about 2 weeks ago
  • Slack is down…2021 is looking up already.
    about 3 weeks ago
  • Subscribe to Locally Sourced by Noel Rappin by @noelrap https://t.co/yZnXfg2tU5
    about 4 weeks ago
  • So true! https://t.co/6axDZAHASZ
    about 1 month ago
  • RSS - Posts
  • RSS - Comments
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.