Re: [Rails] db:migrate unknown attribute on insert via migration

2019-03-28 Thread tw
ccurences of this problem. >> >> The migrations fail when I have a migration that inserts data into a >> table, that has data for a column that was added in a previous migration >> file executed by the same migrate command >> >> Basically I have 3

Re: [Rails] db:migrate unknown attribute on insert via migration

2019-03-27 Thread Eito Katagiri
ts data into a > table, that has data for a column that was added in a previous migration > file executed by the same migrate command > > Basically I have 3 migrations that are run with the following command > rails db:migrate > > > first migration chronologically: > >

[Rails] db:migrate unknown attribute on insert via migration

2019-03-27 Thread tw
lly I have 3 migrations that are run with the following command rails db:migrate first migration chronologically: create_table :campaign_orders do |t| t.integer :order end second migration: add_column :campaign_orders, :priority, :integer third migration: CampaignOrder.create(order: 0, p

Re: [Rails] db:migrate error on test after Rails 4.2 update

2015-02-02 Thread Sean Kelley
I put this in my test.rb file and it seems to have fixed the problem: # from: https://www.relishapp.com/rspec/rspec-rails/docs/upgrade config.active_record.maintain_test_schema = false I also commented out any pending migration checks in my rails_helper file On Friday, January 30, 2015 at 1:03:1

Re: [Rails] db:migrate error on test after Rails 4.2 update

2015-01-30 Thread Sean Kelley
If I run: bundle exec rake db:drop db:create db:migrate I get error that db:migrate needs to be run with RAILS_ENV=test if I bundle exec rake db:drop db:create db:migrate RAILS_ENV=test I get error regarding duplicate table again If I delete db from postgres management screen then run bundle exec

Re: [Rails] db:migrate error on test after Rails 4.2 update

2015-01-30 Thread Colin Law
On 30 January 2015 at 14:40, Colin Law wrote: > On 30 January 2015 at 14:17, Sean Kelley wrote: >> >> Thanks. Your command line affects development db also which is not ideal. I >> looked up db:test:prepare and it appears to be deprecated in 4.2 >> http://stackoverflow.com/questions/15169894/wh

Re: [Rails] db:migrate error on test after Rails 4.2 update

2015-01-30 Thread Colin Law
On 30 January 2015 at 14:17, Sean Kelley wrote: > > Thanks. Your command line affects development db also which is not ideal. I > looked up db:test:prepare and it appears to be deprecated in 4.2 > http://stackoverflow.com/questions/15169894/what-does-rake-dbtestprepare-actually-do > > I decided

Re: [Rails] db:migrate error on test after Rails 4.2 update

2015-01-30 Thread Sean Kelley
Thanks. Your command line affects development db also which is not ideal. I looked up db:test:prepare and it appears to be deprecated in 4.2 http://stackoverflow.com/questions/15169894/what-does-rake-dbtestprepare-actually-do I decided to try it anyway with RAILS_ENV=test but I get same error of

Re: [Rails] db:migrate error on test after Rails 4.2 update

2015-01-30 Thread Antônio Augusto Sousa Britto
try this: bundle exec rake db:drop db:create db:migrate db:test:prepare Att, [image: --] Antonio Augusto [image: http://]about.me/aaugusto

[Rails] db:migrate error on test after Rails 4.2 update

2015-01-29 Thread Sean Kelley
I updated to rails 4.2 from 4.1 recently. Not sure if that fact is related to my problem or not. I have not run any tests since before update. Now attempting to run a controller test give me the error: 'migrations are pending' with recommendation to run: bin/rake db:migrate RAILS_ENV=test wh

Re: [Rails] db:migrate

2014-11-21 Thread M,Gopi M.gopinath
t.string is written as t.strig:name Best Regards, *Gopinath M* Ruby on Rails Developer Contact : +91-9994652146 / +91-9791103743 Skype Id : gopinath.murugan Email : gopi170...@gmail.com On Fri, Nov 21, 2014 at 9:42 PM, Darko Vulin wrote: > I have done bundle install and bundle updat

[Rails] db:migrate

2014-11-21 Thread Darko Vulin
I have done bundle install and bundle update. Here is my [timestamp]_create_users.rb class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.strig :name t.string :email t.timestamps null:false end end end piga@PIGA-PC ~/Workspace/sample_a

[Rails] db:migrate do not run correctly

2010-05-04 Thread Ziburu Debian
Hi, When i run this command i have an error : >rake db:migrate --trace rake aborted! NoMethodError: undefined method `ord' for 0:Fixnum: SET NAMES 'utf8' see the log in attached file. my database.yml file is here : ** #

[Rails] db:migrate fails after upgrade to Rails 2.3.5

2010-03-09 Thread Kurt
Hi -- I'm upgrading an app from Rails 2.0.2 to 2.3.5 in development on a Mac OS/X Leopard. I unfroze the old Rails files, froze the 2.3.5 gem on the machine into the app, and some quick tests of the app showed no problems. However, after trying to run rake db:migrate, it fails silently. Run with

[Rails] db:migrate fail's after a single simple scaffold in WindowsXP with sqlite3

2009-04-13 Thread mgirard1
I tried the following in a new directory: C:\Sources\rails> rails blog [...] C:\Sources\rails> cd blog C:\Sources\rails> ruby script/generate scaffold Post title:string body:text C:\Sources\rails> rake db:migrate The migration successfully created the posts table, but the db:schema:dump target

[Rails] db:migrate and Mysql error

2009-02-09 Thread bflo...@westpac.com.au
Hi, Am getting the error "undefined method `each' for #" when I try to run a "rake db:migrate" on a very simple example for a Mysql database. This follows a very basic setup procedure that works with sqlite3, but fails when I try to use Mysql (note that I have verified that the db on mysql is crea