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

  • How to Fix Rails Flash Rendering When Using Hotwire
  • Hotwire Fix for CORS Error when using Omniauth
  • Fix Installation of Ruby using rbenv on macOS Big Sur
  • RailsConf 2021 and the Future of Conferences
  • Fixing Out of Diskspace Errors on Amazon EC2

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Exactly this…. https://t.co/yWj7fZ01HR
    about 16 hours ago
  • https://t.co/EmagdpLoNv "Introducing GitHub Copilot X · GitHub"
    about 1 day ago
  • RIP Gordon Moore: https://t.co/c5J9LaHrj8
    about 1 day ago
  • Our daughter works as a teaching assistant at a local K-8 public school. It’s become apparent that students today r… https://t.co/p2t912GVyc
    about 2 days ago
  • Working to wrap up my current consulting gig by mid-April. I will be looking for the next thing soon. If anyone has… https://t.co/sg3cSV9yqM
    about 3 days ago
  • RSS - Posts
  • RSS - Comments
Find me on Mastodon