-
Notifications
You must be signed in to change notification settings - Fork 27
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
README Instructions for Rails 3 #2
Comments
Here are some notes on getting it working enough to do the rake ofac:update_data successfully. Hopefully that'll be helpful to someone in the mean time. sudo gem install ofac generate database... vim db/migrate/sometimestamp_create_ofac_sdns.rb and add this line between the first and second of the three lines containing "end" at the bottom of the file. rake db:migrate VERSION=sametimestap rake ofac:update_data |
The gem itself works in rails 3, as we just recently upgraded ourselves and we're still using the gem just fine. Unfortunately, it looks like the generator probably does not work. You are getting the "could not find..." error because rails 3 looks for generators in lib/generators. My generators dir is not in the lib dir. However, I suspect the problems are more than just the location of the files. Generators got a big overhaul in rails 3 using thor now. I believe even the generator base class namespace has changed. If you wanted to try your hand at upgrading it, that would be super, I be very appreciative. But if you just want to run the migration and be done, then it's simple enough to do it manually. Just create a migration and copy the contents of generators/ofac_migration/templates/migration.rb into it. Good luck. I hope you find the gem useful. Kevin Tyll On Dec 22, 2011, at 10:03 AM, Josiah Ritchie wrote:
|
Great, I'll poke at it and see if I can't add something to the project. |
I saw the following error
I couldn't seem to get this workaround working, but atm it looks like you need to reconfigure (recent versions of) mysql before this is allowed. http://stackoverflow.com/questions/18437689/error-1148-the-used-command-is-not-allowed-with-this-mysql-version ? |
I was never aware of that server variable. Looking at the mysql manual, it looks like the default is still to have it enabled up to version 5.7. I'm not sure rails can set the variable when establishing a connection. It may not work unless it's enabled on the DB itself. A down and dirty solution would be to rescue that error in the bulk_mysql_update method and call active_record_file_load. Feel free to submit a pull request if you find a solution. |
Forgive me for my newbness.
I'm trying to use your OFAC gem (v 1.2.3) in rails 3. The README tells me to do scripts/generate ofac_migration which I've determined changed in rails 3 to something like rails generate ofac_migration. When I tried that rails reported "Could not find generator ofac_migration."
Is it possible to use this gem in rails 3? If you can toss me some quick commands I'll be glad to format that into a pull request for inclusion in the readme.
Thank you!
The text was updated successfully, but these errors were encountered: