Re: rake about > Environment staging

Colin Law
2012-06-10T07:36:25Z

On 9 June 2012 23:10, tom
<tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> no, it executes eg the migrations on the staging-db, but if i start up
> webrick via "rails s" it comes up the standard development
environment

Since you have top posted (rather than inline) I am not certain what
you are saying no to.  Are you saying that if you do
RAILS_ENV=development rake db:migrate
that it runs on the staging environment and not development?

Colin

>
> where does rake get the environment info if i ommit
 ''RAILS_ENV'' when
> executing a rake command?
>
> thx
>
>
> On Sat, Jun 9, 2012 at 10:21 PM, Colin Law
<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
>>
>> On 9 June 2012 20:11, tom
<tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> > hi,
>> > its just a simple rake import tasks (using :environment, but all
my rake
>> > commands are affected, even a migration goes straight to
staging...
>> >
>> > namespace :import do
>> >   desc "import automobiles step1"
>> >   task :automobiles => :environment do
>> >     .....
>> >     ........
>> >
>> >> i''ve checked everything for staging, but i dont see
what could point
>> >> towards staging. ill try to setup a new system-user and rerun
rvm setup
>> >> with
>> >> the same rvmrc file...
>>
>> Does it run ok if you do something like
>> RAILS_ENV=development rake .....
>>
>> >
>> > thx for any pointers
>> >
>> >
>> >
>> >
>> > On Sat, Jun 9, 2012 at 8:51 PM, Oscar Del Ben
>> > <oscar.delben-x2GpsThumDamLaUXeIOdZg@public.gmane.org>
>> > wrote:
>> >>
>> >> what''s the content of Rakefile?
>> >>
>> >> --
>> >> Oscar Del Ben
>> >> Sent with Sparrow
>> >>
>> >> On Friday, June 8, 2012 at 12:14 PM, tom wrote:
>> >>
>> >> its empty
>> >>
>> >> here are some values from ''env''
>> >>
>> >> MY_RUBY_HOME=/home/tom/.rvm/rubies/ruby-1.9.3-p194
>> >> rvm_bin_path=/home/tom/.rvm/bin
>> >> GEM_HOME=/home/tom/.rvm/gems/ruby-1.9.3-p194@mygemset
>> >> TERM=xterm
>> >> SHELL=/bin/bash
>> >> IRBRC=/home/tom/.rvm/rubies/ruby-1.9.3-p194/.irbrc
>> >> rvm_path=/home/tom/.rvm
>> >> escape_flag=1
>> >> rvm_prefix=/home/tom
>> >> MAIL=/var/mail/tom
>> >>
>> >>
>> >>
PATH=/home/tom/.rvm/gems/ruby-1.9.3-p194@mygemset/bin:/home/tom/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/tom/.rvm/rubies/ruby-1.9.3-p194/bin:/home/tom/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin
>> >> LANG=en_US.UTF-8
>> >> _second=1
>> >> rvm_version=1.14.1 (stable)
>> >> SHLVL=1
>> >> HOME=/home/tom
>> >> _first=0
>> >> LOGNAME=tom
>> >>
>> >>
>> >>
GEM_PATH=/home/tom/.rvm/gems/ruby-1.9.3-p194@mygemset:/home/tom/.rvm/gems/ruby-1.9.3-p194@global
>> >> install_flag=1
>> >> RUBY_VERSION=ruby-1.9.3-p194
>> >> _=/usr/bin/env
>> >>
>> >>
>> >> i did delete all rvm stuff, rebooted and reinstalled rvm. this
is my
>> >> rvmrc
>> >> file:
>> >> rvm_trust_rvmrcs_flag=1
>> >> rvm use ruby-1.9.3-p194@mygemset --create
>> >>
>> >> thx
>> >>
>> >>
>> >> On Fri, Jun 8, 2012 at 6:32 PM, Oscar Del Ben
>> >> <oscar.delben-x2GpsThumDamLaUXeIOdZg@public.gmane.org>
wrote:
>> >>
>> >> What''s the output of echo $RAILS_ENV ?
>> >>
>> >> --
>> >> Oscar Del Ben
>> >> Sent with Sparrow
>> >>
>> >> On Friday, June 8, 2012 at 8:10 AM, tom wrote:
>> >>
>> >> hi,
>> >> im using rvm + gemsets, but i dont know why rake always picks
staging
>> >> environment. i did not set this anywhere manually. any ideas?
>> >> thx
>> >>
>> >> --
>> >> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
>> >> 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.
>> >>
>> >>
>> >> --
>> >> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
>> >> 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.
>> >>
>> >>
>> >> --
>> >> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
>> >> 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.
>> >>
>> >>
>> >> --
>> >> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
>> >> 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.
>> >
>> >
>> > --
>> > 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-/JYPxA39Uh5TLH3MbocFFw@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.
>>
>> --
>> 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.
>>
>
> --
> 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.

--
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.