Probably a stupid solution, but rather than suggesting non-common noun names, why not suggest to put it in a module like Rails::Journey (or whatever would make sense)?
That alone doesn't solve your issues, but if you don't mind really messing with the way Rails resolves constants, you could use something like these:
https://github.com/garysweaver/classmeta/blob/v0.1.0/lib/classmeta/class_registry.rbhttps://github.com/garysweaver/classmeta/blob/v0.1.0/lib/classmeta/dependencies.rb(not the classmeta gem, but that method of placing a layer of constant resolution between your app and rails.)
That isn't efficient and still doesn't help, but if you took that yet another step further, you could change autoloading such that it keeps track of whether the class was loaded locally or not, and if it was, it would use your Journey class, otherwise it would use some other gem's Journey. You could generify the gem and call it StevePerry or maybe just Perry. Hmm.. might do that later.
Your concern is sane, but attempting to change the developer tendency to call things by great band names seems like it might be a problem.
As usual though, I'm probably wrong. Way wrong. In the worst of ways.
On Wednesday, September 19, 2012 4:00:12 PM UTC-4, Sam Lown wrote:
Hi all,
I know this is a long shot, but could renaming the "Journey" module please be considered by those in a position to support it?
Essentially our project has a model named Journey, the same as Rails 3.2's new routing driver. As a consequence we can no longer upgrade from 3.1, without changing 'journey' throughout our project.
Given that our project pretty much consists of journeys, or Journey models, for which there is practically no other name in the English language, I'm sure you can appreciate how much of a PITA refactoring would be for us.
Looking through Rails 3.2's fresh Gemfile.lock, its clear there are very few common nouns used to name libraries, the exception being Rack, which maybe annoyed a few data center managers but little more.
As a long term strategy, I'd like to suggest avoiding generic or common nouns for projects, so as to avoid conflicts like this.
Cheers, sam