Are there 3 forms to invoke production, staging, etc in Ruby on Rails for rails server, rails console, and rake?



The forms I know of are:


For Rails 3.0:


for rails server:


rails server -e production

for rails console


rails console production

for rake


rake db:migrate RAILS_ENV=production

Is that it? I know for rails runner and rails dbconsole, it is -e production as well. Are there more forms and what are other ones that use -e vs just the name or needing RAILS_ENV?


As a sidenote, why so complicated; is it to increase


Related to : Are there 3 forms to invoke production, staging, etc in Ruby on Rails for rails server, rails console, and rake?
Rails 2.3 and thinking sphinx on staging server: production database not configured. why?
Programming Languages

I'm running Rails 2.3 and Thinking Sphinx 1.4.0. It's running on my development machine and it's deployed to a production server at EngineYard and working fine. At EY we also have a staging server where ts was running fine. Now it gives me an error when I try running:


> rake ts:start
** Invoke ts:start (first_time)
** Invoke thinking_sphinx:start (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
** Invoke environment (first_time)
** Execute environment
** Execute thinking_sphinx:start
Failed to start searchd daemon. Check /var/log/engineyard/sphinx/my_app/searchd.log.
Rails console won't load, “Could not find gem 'rails (= 3.0.0.beta3) ruby”
Programming Languages

I typed in Rails console to begin working and received the error below:


MacBook-Pro:blog agreiner$ rails console
/Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'rails (= 3.0.0.beta3) ruby' in the gems available on this machine. (Bundler::GemNotFound)
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler 1.1.3/lib/bundler/resolver.rb:161:in `start'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler 1.1.3/lib/bundler/resolver.rb:128:in `block in resolve'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/resolver.rb:127:in `catch
Rails:: rake db:create does not return anything on Rails 3.0.3 and Ruby 1.9.2
Programming Languages

I have following configuration:


Ruby version 1.9.2 (i386-mingw32)
RubyGems version 1.7.2
Rack version 1.2
Rails version 3.0.3
Active Record version 3.0.1
Action Pack version 3.0.3
Active Resource version 3.0.3
Action Mailer version 3.0.3
Active Support version 3.0.3

I am running rake db:create command but it returns nothing and using trace, I find following output on the screen


E:Crawlerserver>rake db:create --trace
** Invoke db:create (first_time)
** Invoke db:load_config (
Are there 3 forms to invoke production, staging, etc in Ruby on Rails for rails server, rails console, and rake?
Programming Languages

The forms I know of are:


For Rails 3.0:


for rails server:


rails server -e production

for rails console


rails console production

for rake


rake db:migrate RAILS_ENV=production

Is that it? I know for rails runner and rails dbconsole, it is -e production as well. Are there more forms and what are other ones that use -e vs just the name or needing RAILS_ENV?


As a sidenote, why so complicated; is it to increase

Ruby/Rails - delayed_job Rails.env is “development” when I'm in production
Programming Languages

I'm running Ruby 1.9.2/Rails 3.0.9.


I am using the collective idea fork of delayed_job


I am starting delayed_job like so:
RAILS_ENV=production script/delayed_job start


It pulls jobs from my production database.


However, when processing them, the Rails.env is evaluating as "development".
I am doing some image uploading (using paperclip), and they are going to my "development" directory on my CDN host.


Further evidence:


If I use an if statement in the code that delayed_job runs, Rails.env evaluates to "development".


部署ruby on rails 在市直缓存是出错in ruby on rails production
Programming Languages
in ruby on rails production。I set the config.cache_classes = false is work well but set true,it doesn't work ,and error 500but i don't know why?

HD Wallpapers
3D
3D Abstract
City
Celebrities
Indian Celebrities
Cars
Travel
Girls
Animals Birds
Movies
Sports
Black White
Nature
Planes
Anime
Food Drink
Dreamy Fantasy
Architecture
Games
Space
Holidays
Flowers
Love
Artistic
Baby
Beach
Bikes Motorcycles
Macro
Computers
Vector
Funny
Army
Textures
Brands
Misc
Music
Other
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .