/ / उत्पादन में रेल को प्रारंभ नहीं कर सकता: अमान्य विकल्प -e - रूबी-ऑन-रेल, रूबी-ऑन-रेल -3, कंसोल, रेल-कंसोल

उत्पादन में रेल कंसोल शुरू नहीं कर सकते: अमान्य विकल्प -e - रूबी-ऑन-रेल, रूबी-ऑन-रेल-3, कंसोल, रेल-कंसोल

किसी कारण से, हम उत्पादन में रेल कंसोल नहीं चला सकते हैं। आदेश rails console -e production हमारे विंडोज मशीन पर काम करता है लेकिन हमारे मैक पर विफल रहता है।

यह तो पोस्ट यह बताता है कि इसे कैसे हल किया जाए, लेकिन क्या कोई समझा सकता है कि हम एक मशीन पर इस त्रुटि संदेश को क्यों देख रहे हैं और दूसरे को नहीं?

/usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands/console.rb:23:in `block in start": invalid option: -e (OptionParser::InvalidOption)
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands/console.rb:18:in `new"
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands/console.rb:18:in `start"
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in `start"
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands.rb:41:in `<top (required)>"
from script/rails:6:in `require"
from script/rails:6:in `<main>"

धन्यवाद!

उत्तर:

जवाब के लिए 2 № 1

जैसे त्रुटि कहती है, -e रेल कंसोल कमांड (रेल के आपके संस्करण में) के लिए एक वैध विकल्प नहीं है यह उचित उपयोग है:

$ rails console --help
Usage: console [environment] [options]
-s, --sandbox                    Rollback database modifications on exit.
--debugger                   Enable ruby-debugging for the console.
--irb                        DEPRECATED: Invoke `/your/choice/of/ruby script/rails console` instead

जवाब के लिए 0 № 2

दरअसल, मैं -e विकल्प देखता हूं। मजेदार

rails console --help

देता है

Usage: rails console [environment] [options]
-s, --sandbox                    Rollback database modifications on exit.
-e, --environment=name           Specifies the environment to run this console under (test/development/production).
Default: development
--debugger                   Enable the debugger.

rails console -e production

मुझे देता है

Loading production environment (Rails 4.0.1)
irb(main):001:0>

मैं रेल 4.0.1 पर हूं।

संपादित करें - 3.2.12 में समस्या होने के बारे में याद किया।