-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrating problems with pg_search to Heroku #90
Comments
It's very strange that it says the method isn't defined. It's also strange that it doesn't give a better name for your User class. |
I agree that the message that I got for the class name instead of "User" is very odd. One of the main things I had to do when I was migrating from EC2 to Heroku was transitioning to Bundler. I doubt that could have caused the problem but I can't really think of anything else. The User model is only defined in |
Sorry to keep adding to my own thread here, but I also realized that I while I was migrating I upgraded from rails 2.3.16 on EC2 to 2.3.17 on Heroku. So I was wondering if something changed in rails 2.3.17 and I found this on StackOverflow: I wonder if there's something different about the way scope methods could be added to classes in rails 2.3.17 |
No problem. I appreciate all the information you can give me! Yeah, I haven't been actively maintaining 0.2.x support against Rails 2.3, so I don't know anything about what has happened with recent 2.3 releases. Does it only break on Heroku? If you call the same code in a local development environment, what happens? I don't have enough time to look into this issue, but if you are able to figure out a solution, I will gladly accept a pull request and release a new 0.2.x version of pg_search. Sorry I can't help more! |
So I actually downgraded my rails installation on Heroku to match EC2 and it still works on my EC2 stack and not on Heroku. Then I took the time to replicate my rails 2.3.16 stack with Engineyard local with the exact same environment to the best of my ability and it still did not work. I think there must be something wrong? I even got rid of Bundler and copied the exact same code. I'm at my wits end now. |
I would try downgrading Rails to the version that was working before on AWS just to make sure that the Rails upgrade was the core cause. It sounds like it has nothing to do with Heroku. I hope you can figure out an answer. My best advice is to upgrade to Rails 3 because Rails 2.3 has not been supported with security updates for some time. |
I am running a legacy Rails app on 2.3.18 with Bundler and Ruby 1.9.3, and ran into the same issue as @ayl:
This seemed odd, as
Which exposed the issue, they are symbols now. I'm trying to figure out when the change from strings to symbols was made, but I have a branch that makes it workable in 2.3.18 at least. |
And the change from strings to symbols comes from using Ruby 1.9.3 instead of Ruby 1.8.7. Maybe the line could then be changed to have a Ruby version dependant condition, or a larger condition:
|
@openfirmware That makes sense. We could also do something like: if respond_to?(:scope) && !protected_methods.map(&:to_s).include?("scope") Would you like me to pull in this change and cut a new 0.2.x gem version? Just send a pull request. Or just let me know and I can put it together. |
Fixes Casecommons#90, a compatibility issue between Ruby 1.8.7 and Ruby 1.9.3.
Thanks! I just sent a PR with your suggestion. |
Closing this out because it is old and deals with an outdated version of pg_search. Feel free to open a new issue if anything similar comes up again with the latest versions. Thanks! |
Hey everyone,
I'm having problems with migrating an existing Rails 2.3.17 app to Heroku. It works totally fine with my custom EC2 Rails stack but on Heroku Cedar with Postgres 9.1 I can't seem to get it to work.
In my Gemfile I have:
In my model I have:
When I run it in the console:
I've been beating my head against the wall trying to figure this out to no avail... Help?
The text was updated successfully, but these errors were encountered: