Skip to content
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

Don't know how to build task 'ar:auto:upgrade' #942

Closed
joslinm opened this issue Oct 17, 2012 · 12 comments
Closed

Don't know how to build task 'ar:auto:upgrade' #942

joslinm opened this issue Oct 17, 2012 · 12 comments

Comments

@joslinm
Copy link
Contributor

joslinm commented Oct 17, 2012

In the documentation, it seems to indicate that I can use the padrino rake ar:auto:upgrade, but it's not working.

mark@mark-laptop:~/dev/projects/bitfountain/yipp$ padrino rake ar:auto:upgrade
=> Executing Rake ar:auto:upgrade ...
rake aborted!
Don't know how to build task 'ar:auto:upgrade'

(See full trace by running task with --trace)

@nesquena
Copy link
Member

Can you type padrino rake -T and check out the output. Do you see other ar rake tasks methods but just not 'upgrade'. Which ORM did you select? https://github.com/DAddYE/mini_record?

@joslinm
Copy link
Contributor Author

joslinm commented Oct 17, 2012

I'm using ActiveRecord, but mini_record looks awesome! I should try that.

=> Executing Rake -T ...
rake ar:abort_if_pending_migrations # Raises an error if there are pending...
rake ar:charset # Retrieves the charset for the curren...
rake ar:collation # Retrieves the collation for the curr...
rake ar:create # Create the database defined in confi...
rake ar:create:all # Create all the local databases defin...
rake ar:drop # Drops the database for the current P...
rake ar:drop:all # Drops all the local databases define...
rake ar:forward # Pushes the schema to the next version.
rake ar:migrate # Migrate the database through scripts...
rake ar:migrate:down # Runs the "down" for a given migratio...
rake ar:migrate:redo # Rollbacks the database one migration...
rake ar:migrate:reset # Resets your database using your migr...
rake ar:migrate:up # Runs the "up" for a given migration ...
rake ar:reset # Drops and recreates the database fro...
rake ar:rollback # Rolls the schema back to the previou...
rake ar:schema:dump # Create a db/schema.rb file that can ...
rake ar:schema:load # Load a schema.rb file into the database
rake ar:setup # Create the database, load the schema...
rake ar:structure:dump # Dump the database structure to a SQL...
rake ar:translate # Generates .yml files for I18n transl...
rake ar:version # Retrieves the current schema version...
rake gen # Generate the Rakefile
rake routes[query] # Displays a listing of the named rout...
rake routes:app[app] # Displays a listing of the named rout...
rake secret # Generate a secret key
rake seed # Load the seed data from db/seeds.rb
rake test # Run application test suite
rake test:models # Run tests for test:models

@nesquena
Copy link
Member

I don't think activerecord has an 'auto:upgrade' task. That doc is probably wrong, the upgrade task is added by mini_record AFAIK.

@nesquena
Copy link
Member

Which doc is that by the way? I will update for clarity. Sorry about the confusion.

@joslinm
Copy link
Contributor Author

joslinm commented Oct 17, 2012

@joslinm
Copy link
Contributor Author

joslinm commented Oct 17, 2012

No problem, thanks for such a quick response.

@nesquena
Copy link
Member

Interesting, thanks for the link. Any thoughts @DAddYE? looks like we did in fact manually add something like that to activerecord before. My suspicion is that once minirecord came out, people who want that feature may just want to use that instead.

@DAddYE
Copy link
Member

DAddYE commented Oct 17, 2012

I man! Yup you are right, I've removed extra no AR code from padrino and put into MiniRecord

@joslinm
Copy link
Contributor Author

joslinm commented Oct 17, 2012

Hey guys, sorry to bother but I figure while I have your attention.. I'm having trouble initializing my production & test databases. I'm using Postgres, but whenever I run migrate or reload, it automatically does it on the development database. This is problematic when I run padrino rake test.

So I tried doing padrino rake ar:drop:all and then padrino rake ar:create:all, and this does work.. only there seems to be no corresponding padrino rake ar:migrate:all. What do I do instead?

Oh! padrino rake ar:migrate -e test

@nesquena
Copy link
Member

@joslinm Yeah PADRINO_ENV=test padrino rake ar:migrate or padrino rake ar:migrate -e test

@pfhawkins
Copy link

I hope I'm not a bother, but I found that same inaccurate information in the docs two years later. So while this issue has been closed, the fix (updating the docs) does not seem to have been applied.

@robermorales
Copy link

robermorales commented May 4, 2016

ujifgc added a commit that referenced this issue Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants