Code Monkey home page Code Monkey logo

Comments (2)

bpot avatar bpot commented on September 27, 2024

Yup, the RAILS_ENV issue is fixed on master. I hope to push a new version of the gem this week with that fix and 3.2 support. What errors are you seeing from the migration?

from data_fabric.

vishakhasawant avatar vishakhasawant commented on September 27, 2024

Hi bpot,

Thanks for the reply. Below is the error stack-trace I am getting while trying to run migration with model.create statements.

e.g.
class User < ActiveRecord::Migration
def change
create_table :user do |t|
t.string :name
t.string :email
t.string :address
end
#data
User.create(:name => 'firstname', :email => '[email protected]', :address => 'uk')
end

end

PGError: ERROR: relation "permissions" does not exist
LINE 4: WHERE a.attrelid = '"permissions"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"permissions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1003:in async_exec' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1003:inexec_no_cache'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:591:in block in exec_query' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:244:inblock in log'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/notifications/instrumenter.rb:21:in instrument' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:239:inlog'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:590:in exec_query' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1102:incolumn_definitions'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:781:in columns' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:inblock (2 levels) in initialize'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in with_connection' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:92:inblock in initialize'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:112:in yield' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:112:indefault'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:112:in block in initialize' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:723:inyield'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:723:in default' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:723:incolumn_defaults'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/persistence.rb:327:in attributes_from_column_definition' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/locking/optimistic.rb:69:inattributes_from_column_definition'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:1550:in initialize' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:508:innew'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:508:in create' /mnt/hgfs/nusdigital/db/migrate/20111219113023_create_permissions.rb:12:inchange'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:391:in block (2 levels) in migrate' /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/benchmark.rb:295:inmeasure'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:391:in block in migrate' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:inwith_connection'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:375:in migrate' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:507:inmigrate'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:687:in block (2 levels) in migrate' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:742:incall'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:742:in block in ddl_transaction' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:intransaction'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/transactions.rb:208:in transaction' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:742:inddl_transaction'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:686:in block in migrate' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:671:ineach'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:671:in migrate' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:549:inup'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/migration.rb:530:in migrate' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/railties/databases.rake:161:inblock (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in call' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:inblock in execute'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in each' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:inexecute'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:inmon_synchronize'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:176:inblock in invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:174:in each' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:174:ininvoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:157:in block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:inmon_synchronize'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:ininvoke'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in invoke_task' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:inblock (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in each' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:inblock in top_level'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:intop_level'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in block in run' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:instandard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in run' /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in<top (required)>'
/usr/local/rvm/gems/ruby-1.9.2-p290/bin/rake:19:in load' /usr/local/rvm/gems/ruby-1.9.2-p290/bin/rake:19:in

'
Tasks: TOP => db:migrate:reset => db:migrate

Regards,

Vishakha

from data_fabric.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.