Re: [Rails] create a model/migration from an object that is returned from a gem that i installed
On 30 May 2012 22:44, eldorado554 <pringlesoriginal@gmail.com> wrote:
> I am using the fog gem.
>
> The fog gem has been added to my Gemfile
>
> I would like to store the Fog object in my own database/model/
> migration.
>
> I tried to create the model like so, as I would usually create a
> model, but using the Fog data type:
>
>
>
>
> [tago@DevServer my]$ rails generate model fogaws fogobject:Fog
> invoke active_record
> create db/migrate/20120530114756_create_fogaws.rb
> create app/models/fogaws.rb
> invoke test_unit
> create test/unit/fogaws_test.rb
> create test/fixtures/fogaws.yml
>
>
>
>
> However when I try the rake db:migrate I get this show stopper:
>
>
>
>
> == CreateFogaws: migrating
> ===================================================
> -- create_table(:fogaws)
> rake aborted!
> An error has occurred, this and all later migrations canceled:
>
> undefined method `Fog' for
> #<ActiveRecord::ConnectionAdapters::TableDefinition:0x7fb3bc773798>
I don't know anything about Fog, but if you know what should be in the
table schema then you could just write the migration by hand.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home