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
undefined method `add_foreign_key' #116
Comments
What version of Rails and which database adapter? |
Matt I am encountering the same issue and I am running a sinatra application server that is designed to mimic the rails framework, its pretty stripped down, the application framework is designed with a subset of the rails functionality (i.e. core functionality, migrations, generation of migration files and models and so forth), I am somewhat new to this framework in experience but I have background experience with other languages and am hoping that you can provide some insight on how I can mitigate this issue, I have read all the documentation and attempted to follow the examples with no luck. I have looked at the Issues log also and looked for a resolution, same results, I really am excited to use this gem in my simple project and hopefully you can take a look at my repo and give me some insight. At this point anything will be helpful, checkout the foreigner branch specifically the errors.txt file it gives a full stack trace that I have pretty much followed all the way through.. thanks in advance.. regards |
i am using Rails 3.2.13 and mysql2 (0.3.11 x86-mingw32) |
😦 I'll look Sunday night. |
Is there an initializer where you can put this code? ActiveSupport.on_load :active_record do
Foreigner.load
end |
I am in a similar situation. Rails 3.2.13 with mysql2 0.3.11. I added your initializer and it didnt make a difference. Unfortunately I am on an older version of foreigner 1.2.1 |
@vipankumar1987 Did you add foreigner to your Gemfile first? It seems like you installed the gem without requiring it first. |
Related: if anyone is trying to use Foreigner with active_record_migrations then see rosenfeld/active_record_migrations#5 @matthuhiggins Any comment on that? |
I am also getting this issue.
Let me know where I could be wrong. |
If you get here from google, and are using |
I have install this module as gem install foreigner and i use following code
when i execute command rake db:migrate then i got this error
The text was updated successfully, but these errors were encountered: