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 6181147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:58:11+00:00 2026-05-24T00:58:11+00:00

I am using rails version 3.0.3. If I run the server in the development

  • 0

I am using rails version 3.0.3.
If I run the server in the development environment, everything works ok, but when trying to run in a production environment then rails skip read the code from the file /config/ enviroment.rb.
I have the following error:

=> Booting WEBrick
=> Rails 3.0.3 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/herman/WORK/bloomnet/broniszeKwiaty/broniszeKwiaty/broniszeKwiaty/app/models/produkt.rb:10: uninitialized constant Produkt::GRUPY_PRODUKTOWE (NameError)
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:138:in `eager_load!'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `each'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `eager_load!'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:135:in `each'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:135:in `eager_load!'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:108:in `eager_load!'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/finisher.rb:41
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `run_initializers'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `send'
        from /usr/local/lib64/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
        from /home/herman/WORK/bloomnet/broniszeKwiaty/broniszeKwiaty/broniszeKwiaty/config/environment.rb:5
        from /home/herman/WORK/bloomnet/broniszeKwiaty/broniszeKwiaty/broniszeKwiaty/config.ru:3
        from /usr/lib64/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
        from /usr/lib64/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
        from /home/herman/WORK/bloomnet/broniszeKwiaty/broniszeKwiaty/broniszeKwiaty/config.ru:1:in `new'
        from /home/herman/WORK/bloomnet/broniszeKwiaty/broniszeKwiaty/broniszeKwiaty/config.ru:1

My enviroment.rb looks like:

    # Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
BroniszeKwiaty::Application.initialize!


#exceptions
CONTROLLERS_NAMES = {"menu" => "menu_index"}
CONTROLLERS_NAMES_IN_VIEW = {"names" => "imieniny", "produkty" => "towary"}

CONTROLLERS_HIDDEN = [7, 15, 18]

$ZABRONIONE_ROZSZERZENIA = %w{ php rb cgi py shtml pl }

# Ustawienia dla zdjec :


$HEIGHT_MINI3 = 106
$WIDTH_MINI3 = 106

$HEIGHT_CAL = 120
$WIDTH_CAL = 120

$HEIGHT_MINI2 = 163
$WIDTH_MINI2 = 163

$HEIGHT_MINI = 174
$WIDTH_MINI = 174

$WIDTH_MATCHED = 500
$HEIGHT_MATCHED = 300

$WIDTH = 800
$HEIGHT = 600
##################################
$default_cal_path = '/images/cal.png'
$default_cal2_path = '/images/cal2.png'



MENU_URL = { 8 => '/kontakt', 2=> "/informacje", 6=>"/najemcy", 5 =>'/hale', 3 => '/oferta-handlowa', 7 => '/multimedia'} #zastepuje adres /podstrony/:id na wartosc z tablicy (url(/podstrony/2)  => url(/informacje))


$ID_HK = 3 #id hali kwiatow w bazie bronisz
$ID_WK = 8 #id wiaty kwiatowej w bazie bronisz
PELNA_NAZWA_HALI = {3 => "hala kwiatowa",8 => "wiata kwiatowa"}
SKROT_NAZWY_HALI = {3 => "HK",8 => "WK"}

GRUPY_PRODUKTOWE = ["opakowania do kwiatów","kwiaty cięte, zieleń","rośliny doniczkowe", "dodatki kwiatowe"]

Many thanks for help

  • 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-05-24T00:58:12+00:00Added an answer on May 24, 2026 at 12:58 am

    .. sometimes, ruby takes a wrong turn when deciding where to look for a constant. You defined the constant GRUPY_PRODUKTOWE globally and you probably access it within the Product model with just “GRUPY_PRODUKTOWE”. Try “::GRUPY_PRODUKTOWE” so it knows to look for it in the global scope.

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

Sidebar

Related Questions

I'm trying to load up rails in the test environment using a ruby script.
I'm trying to setup an automated build server for my rails projects using Hudson
i'm trying to run Redmine using rubyEE, but I am constantly facing some action_controller
I am new to rails and using version 3.1.0 and trying to deploy to
I'm trying to migrate my database in rails but no tables are found. Using
I'm using rails, but doing all my Javascript unobtrusively using jQuery in application.js .
I'm trying to deploy my rails application by using Passenger and Capistrano on Dreamhost.
I'm frequently starting up rails console or rails server or using other command line
I moved from RVM to rbenv on my production server. I uninstalled rvm using
When I run: rails generate model MyUsers I get -S, [--skip-sprockets] # Skip Sprockets

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.