Skip to content

Conversation

hopsoft
Copy link
Contributor

@hopsoft hopsoft commented Feb 16, 2011

After installing the annotate gem and attempting to run annotate on my project, I received the following error:

no such file to load -- annotate/annotate_models (MissingSourceFile)

To correct the problem, I simply updated the require statements in the tasks to use a fully qualified path to the needed files. I've tested this with success locally, but my tests have not been formal or robust... basically 1 developer machine with the patch applied.

It would be great to have this fix deployed in later versions of the gem, so I don't have to tweak the gem after installation though.

Thanks for considering my patch.

--Nathan

@ctran
Copy link
Owner

ctran commented Feb 26, 2011

What's your version of Rails and annotate that you have this problem with?

@hopsoft
Copy link
Contributor Author

hopsoft commented Feb 26, 2011

I'm running Ruby 1.8.7 Enterprise Edition under RVM.

rails (2.3.2)
annotate (2.4.0)

Unfortunately I don't have Bundler wired up for this project.

@lucascaton
Copy link

I have the same problem here...

@lucascaton
Copy link

I'm using Rails 2.3.9 with bundler!

@amalagaura
Copy link
Contributor

I have this same problem after I switched to bundler. The patches fix it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the right way to fix this. I'd avoid doing a require with full path.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require with full path is supposed to be OK in Ruby 1.9 -- it won't require the same file twice no matter what (knock wood)

ctran added a commit that referenced this pull request Jun 8, 2011
fix for require statements in tasks
@ctran ctran merged commit 3fae329 into ctran:master Jun 8, 2011
@ctran ctran added the released label Dec 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 participants