Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8011703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:05:50+00:00 2026-06-04T19:05:50+00:00

On my development machine: $ bundle exec rails console Loading development environment (Rails 3.2.3)

  • 0

On my development machine:

$ bundle exec rails console
Loading development environment (Rails 3.2.3)
1.9.3p194 :001 > Rails.env
 => "development"

This is expected. So far, so good.

Yet on my production server (to which I have deployed using Capistrano), I get exactly the same result:

$ bundle exec rails console
Loading development environment (Rails 3.2.3)
1.9.3p194 :001 > Rails.env
 => "development"

On either machine, I can instead do:

$ bundle exec rails console production
Loading development environment (Rails 3.2.3)
1.9.3p194 :001 > Rails.env
 => "production"

My question is: on the production server, shouldn’t bundle exec rails console load the production environment by default, instead of the development environment? And if not, why not?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:05:52+00:00Added an answer on June 4, 2026 at 7:05 pm

    The rails executable can’t know which environment should run on which machine.

    you can put export RAILS_ENV=production in your ~/.bashrc or ~/.bash_profile file of the user you want to start the console with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, I've been using sqlite3 as development successfully for this tiny rails 3.1 project,
I'm having problems installing development machine for Sharepoint (Foundation) 2010. This is what I
I have plenty of RAM on my development machine. Can I move my Rails'
On my development machine, I use port 10524. So I start my server this
On my development machine (which has the Quickbooks SDK installed) I can connect and
I have my development machine where I develop the code, my server machine where
On my development machine, I am currently registering my components in Castle Windsor using
I've just upgraded my development machine and have moved over a website I was
I have a dual setup development machine with Visual Studio 2003 and 2005. How
I have IIS 7.0 on my development machine and IIS 6.0 on my server.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.