I was trying to reset the seed data in my heroku database for an app i'm building and the developer site from heroku says to use heroku pg:reset DATABASE to do so.
After doing this and migrating my database again heroku run rake db:migrate followed by re-seeding with heroku run rake db:seed I cannot migrate any apps. even new ones. I don't know if a schema will help. It was not a database problem I was trying to fix, just a removal of repeated records.
Related
I'm following this tutorial on creating Ruby on Rail apps, and I've hit a roadblock. I am trying to migrate its database to Heroku, only to be told this:
c:\Sites\railsbridge\test_app>heroku run rails db:migrate
Running rails db:migrate on floating-ocean-40882... up, run.5709 (Free)
rails aborted!
Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not
loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the
minimum required by ActiveRecord).
I already have sqlite3 listed in my Gemfile, what am I doing wrong?
Heroku does not support sqlite and it is suggested to use postgresql for production
Please look into the following posts
Heroku deployment failed because of sqlite3 gem error
Deploying RoR app to Heroku with Sqlite3 fails
You can use Postgresql for production and the change should be simple. Just a change of gem in Gemfile and change in database.yml will do.
Heroku doesn't support SQLite it only support PostgresSQL here is full documentation for deployment on Heroku
I have tried multiple ways to convert my existing rails app's database from sqlite3 to postgresql. i tried converting my database.yml file's adapter to postgresql and running rake db:create and migrate but that did not work i tried adding gem 'pg' instead of sqlite3 but still does not work. I am not able to push my projects to heroku i always get an "application error" when i run my heroku web site.
Make sure that you have removed sqlite3 from your Gemfile, and run bundle.
You may need to do a heroku migration.
heroku run rake db:migrate
I am running Rails 3.2.12 and deploying to Heroku.
Currently, to get my css files to update locally I need to run
RAILS_ENV=production bundle exec rake assets:precompile
I was wondering how I can get my asset pipeline to start automatically updating upon sacing again in development mode.
I have read the following article, but I am unsure which set up to follow. I am just using basic scss, nothing crazy.
https://devcenter.heroku.com/articles/rails-asset-pipeline
Thank you.
I recently migrated a rails 3 app from a Mac OS X environment to a Debian server. The migration succeeded, the app is running through the WEBrick server but the formatting that had originally come with the activeadmin gem has disappeared from most views. The form is still accessible and functioning but it is in the default html formatting.
However http://domainexample.com:3000/admin still has the custom formatting, any ideas of why this has happened?
In my troubleshooting:
reinstalled activeadmin with
rails generate active_admin:install
When I run
rake db:migrate
got devise errors so dropped the databases and ran
rake db:create
rails s still works and boots the server but
rake db:migrate throws an error:
Mysql2::Error: Table 'admin_users' already exists
UPDATE:
This fixed the problem, but I don't understand why.
had to copy the active_admin.css as active_admin.css.dup.css file from my local and upload it to the server version in app/assets/stylesheets. The server version was implementing namespaces for some reason.
I know that in heroku you can run
heroku rake db:migrate
from your ruby console and itll run the migrations on the database for your heroku app.
Is there something similar for appharbor and ef code first migrations?
The Entity Framework team is working on this and there's a beta out. Here's a blog post from Scott Hanselman. This feature comes with support for migrating to remote servers (like the one you might have on AppHarbor) too.