On the wiki it says to migrate your DB to production, you can run: rake migrate RAILS_ENV="production" This is taken from: http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations My database is set up with correct MySQL permissions granted and the database.yml is pointing at it. I get no errors when I run it, but equally my production database does not change at all. When I run the comment I just get this: dave$ rake migrate RAILS_ENV="production" (in /Users/dave/Sites/sampleapp) dave$ What am I doing wrong? -- Posted via http://www.ruby-forum.com/.
Try it the other way round: RAILS_ENV=production rake migrate -Jonathan. On 7/5/06, Dave Verwer <dave@dvhome.co.uk> wrote:> On the wiki it says to migrate your DB to production, you can run: > > rake migrate RAILS_ENV="production" > > This is taken from: > > http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations > > My database is set up with correct MySQL permissions granted and the > database.yml is pointing at it. I get no errors when I run it, but > equally my production database does not change at all. When I run the > comment I just get this: > > dave$ rake migrate RAILS_ENV="production" > (in /Users/dave/Sites/sampleapp) > dave$ > > What am I doing wrong? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Unfortunately that doesnt work either, same result. I also found mention of an environment variable called RAILS_ENV so I also tried the following: $ set RAILS_ENV=production $ rake migrate Unfortunately, nothing new happened... Jonathan Viney wrote:> Try it the other way round: > > RAILS_ENV=production rake migrate > > -Jonathan.-- Posted via http://www.ruby-forum.com/.
export RAILS_ENV=production rake migrate Are you sure you haven''t manually set the value in environment.rb ... -Jonathan. On 7/5/06, Dave Verwer <dave@dvhome.co.uk> wrote:> Unfortunately that doesnt work either, same result. > > I also found mention of an environment variable called RAILS_ENV so I > also tried the following: > > $ set RAILS_ENV=production > $ rake migrate > > Unfortunately, nothing new happened... > > > > Jonathan Viney wrote: > > Try it the other way round: > > > > RAILS_ENV=production rake migrate > > > > -Jonathan. > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
This worked, i''ll see if I can update the Wiki because I guess that should contain the correct instructions :) Jonathan Viney wrote:> export RAILS_ENV=production > rake migrateThanks for your help Jonathan -- Posted via http://www.ruby-forum.com/.
Great. Are you really sure that ''RAILS_ENV=production rake migrate'' didn''t work? That''s what I use all the time... -Jonathan. On 7/5/06, Dave Verwer <dave@dvhome.co.uk> wrote:> This worked, i''ll see if I can update the Wiki because I guess that > should contain the correct instructions :) > > Jonathan Viney wrote: > > export RAILS_ENV=production > > rake migrate > > Thanks for your help Jonathan > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Unfortunately it didnt, I am using Mac OS X if that matters Jonathan Viney wrote:> Great. > > Are you really sure that ''RAILS_ENV=production rake migrate'' didn''t > work? That''s what I use all the time... > > -Jonathan.-- Posted via http://www.ruby-forum.com/.
Jonathan Viney wrote:> export RAILS_ENV=production > rake migrate > > Are you sure you haven''t manually set the value in environment.rb ... > > -Jonathan.For the newbies out there like me: In the environment.rb file the environment type has to be in quotes like so: RAILS_ENV="production" -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Was there a resolution to this issue? I''m having the same problem where ruby script/console shows an error but RAILS_ENV shows production. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Feb 1, 2011 at 12:19 PM, Anthony M. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Was there a resolution to this issue? I''m having the same problem where > ruby script/console shows an error but RAILS_ENV shows production.Given that the original message was from 2006, picked up again by someone in 2010 -- maybe you should start a new thread with a clear description of your problem (which doesn''t match that of the OP). :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Try RAILS_ENV=production rake db:migrate This is what im using all the time -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Possibly Parallel Threads
- rake db:migrate debacle
- rake db:migrate_plugins RAILS_ENV=production fails with "no such file to load -- initializer"
- How to supress field name in error message?
- create production tables? use "rake db:migrate"?
- rake migrate the first time - uses more than schema_info?