similar to: warning: already initialized constant (is this a bug?)

Displaying 20 results from an estimated 20000 matches similar to: "warning: already initialized constant (is this a bug?)"

2012 May 29
0
racc/parser.rb:27: warning: already initialized constant Racc_Runtime_Version
Hi, I tried this puppet shell command and I''m getting a warning: oracle@z3:/pt/b/puppet$ puppet describe -s user racc/parser.rb:27: warning: already initialized constant Racc_Runtime_Version Here is some info about my setup: oracle@z3:/pt/b/puppet$ oracle@z3:/pt/b/puppet$ ruby -v ruby 1.9.2p318 (2012-02-14 revision 34678) [x86_64-linux] oracle@z3:/pt/b/puppet$ oracle@z3:/pt/b/puppet$
2009 Jan 29
0
How to get rid of an ActiveRecord warning "already initialized constant"
I need to get a proxy class for a specific AR validation I reuse a piece of code (from Globalize), where it''s set as a constant : module Globalize module Model module ActiveRecord class << self def create_proxy_class(klass) Object.const_set "#{klass.name}Translation", Class.new (::ActiveRecord::Base){..} .. end so in my validation module,
2009 Oct 02
0
warning: already initialized constant ...
Hi, Every time I start the console, run tests or start any rake thing I get this at the beginning: /home/sweethome/railsproject/vendor/rails/railties/lib/rails/ version.rb:3: warning: already initialized constant MAJOR /home/sweethome/railsproject/vendor/rails/railties/lib/rails/ version.rb:4: warning: already initialized constant MINOR
2005 Jun 08
0
warning: already initialized constant problem
Hi, I am getting the following error in WeBrick when using salted login generator: > ./script/../config/..//app/helpers/user_helper.rb:7: warning: already > initialized constant DEFAULT_HEAD_OPTIONS > 127.0.0.1 - - [31/May/2005:18:04:55 PDT] "HEAD /company.html HTTP/1.0" > 200 0 Now, I can easily get around this bug but i wondered how to prevent it from happening.
2005 Dec 23
0
adding items to a particular invoice on the same page
Hi, I have been building a invoice generator(in ruby on rails) for the past some days and been stuck on the final page .This page will have fields for entering the invoice details and also I have added a AJAX effect so that fields for invoice items get created dynamically . its all design well but the issue comes when I am trying to save the page .That is adding ivoice details to invoices
2005 Sep 19
2
warning: already initialized constant
Hello all. I''m new to Rails and working on replacing an existing Perl based app. Everything has been smooth, and I''m beginning to get the hang of things. I just implemented DB based photo handling, with code directly from the Pragmatic Rails book. Here''s a fresh server log of my app, with a logged in user (by cookie and session) getting a list of his photos. The
2006 Nov 09
0
Apache configuration
i TRY TO CONFIGURE APACHE FOR RUBY ON RAILS ON UNIX. BY THE FOLLOWING WAYl: Install FastCGI 1. wget http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz 2. gunzip fcgi-2.4.0.tar.gz 3. tar -xvf fcgi-2.4.0.tar 4. cd fcgi-2.4.0 5. ./configure 6. make 7. make install 8. cd ../ Install mod_fcgid 1. cd ~ 2. wget http://fastcgi.coremail.cn/mod_fcgid.1.09.tar.gz 3. gunzip
2006 Mar 05
3
Trying to connect tables .....
I am trying to ''connect'' two tables AdHour and Ad in the method below. However, the line with the asterisks is causing the following error: "You have a nil object when you didn''t expect it! The error occured while evaluating nil.user_id" I''ve included the model for both AdHour and Ad. Why doesn''t the script like how I am connecting the
2006 Jul 19
5
weird result for a custom attr reader!
Hi all, I am having a weird problem reading a value from my model. basicaly, I have these two models: class Category < ActiveRecord::Base acts_as_tree :order => "name" belongs_to :item_type has_many :specific_category_names end and class SpecificCategoryName < ActiveRecord::Base set_table_name "Specific_category_names" has_many :products belongs_to
2006 Jun 28
2
NoMethodError when setting session variable
I know this is dumb, but I can not set a session variable. I get the followig error: Processing Base#edit (for 67.174.108.88 at 2006-06-28 17:17:34) [GET] Session ID: 3c4b2bad18c8bc289b719dc056913be7 Parameters: {"action"=>"edit", "id"=>"11", "controller"=>"image",
2007 Nov 18
2
ActiveACL and "already initialized constant OPTIONS"
Hi, I''ve been trying to get ActiveACL to work with my new project, and as the title suggest I''m stuck. I get the following error: /var/lib/gems/1.8/gems/rails-1.2.5/lib/commands/servers/mongrel.rb:15: warning: already initialized constant OPTIONS /var/lib/gems/1.8/gems/rails-1.2.5/lib/commands/servers/mongrel.rb:18: undefined method `options'' for []:Array
2006 Jan 11
3
Idle Apache+FastCGI sleeping?
Wondering: Does Apache shut down inactive FastCGI processes if it doesn''t get any requests for a while? My app works fine if it''s being used regularly, but it will respond very slowly to the first request after an hour of zero traffic. Is there a way to keep FastCGI ready all the time, even when there haven''t been any requests for a while? We''re deploying
2006 Feb 07
3
Problems with flickr gem: already initialized constant
New to rails so please bear with me. Am having difficulties with the flickr plugin. trying to follow the video as a starter, and keep hitting the following problem when I require ''flickr'' in the environment.rb file testbed:/srv/www/htdocs/carstuff # ruby script/server => Booting WEBrick... /usr/local/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:274: warning:
2006 Jan 26
2
Apache FastCGI seems single threaded (W2K)
Hi, I have set up Apache 2, FastCGI on W2K. My Rails project seems to run fine. I wanted to test how many FastCGI processes I would need. So I created a new project with 1 controller, that has 1 method : def index s = Time.new while Time.new - 3 < s end render_text "#{s.strftime(''%H:%M:%S'')} - #{Time.new.strftime(''%H:%M:%S'')}" end The
2006 Mar 29
0
placing specific views within a subdirectory?
Can anyone show me how to go about placing specific views within a directory? ie: controllers/hello.rb views/hello/english/world.rhtml views/hello/english/people.rhtml views/hello/spanish/mundo.rhtml views/hello/spanish/gente.rhtml instead of the usual: controllers/hello.rb views/hello/world.rhtml views/hello/mundo.rhtml hello.rb currently contains the basic methods: class ChartsController
2010 Jun 10
1
RSpec 2: uninitialized constant - mocking belongs_to AR relation
gems/ruby-1.9.2-head/bundler/gems/rspec- core-2398fcadf5beb256bed9c548c59445d3b4c8a047-master/lib/rspec/core/ backward_compatibility.rb:26:in `const_missing'': uninitialized constant Message::User (NameError) from /Users/kristianconsult/.rvm/gems/ruby-1.9.2-head/bundler/gems/ rspec-expectations-996c752171a0a0e16347e934dadc25767e31186c-master/lib/
2006 Jan 07
2
can store array or hash in cookies?
Hi According to rdoc: value - the cookie''s value or list of values (as an array). So, I can use arrays, briliant. But.... It does not work (at least on webrick) I wrote a controller: def check_cookies_first cookies[:chef] = {:value => ["first", "second"], :expires => Time.local (2020)} render_text ":)" end def
2006 Aug 16
0
Multiple observer
Hi I have three drop downs (State, City, Locality) and would like to populate City based on State selection and Locality based on City selection. I have observers on two fields (State, and City). The observer_field on state works fine and it populates city based on state selection. But the observer on city doesn''t populate Locality. Now sure whats wrong with my code. here is the
2006 Aug 17
0
AJAX - Having Multiple SELECT (Drop Down), and dependency
Hi I have three drop downs (State, City, Locality) and would like to populate City based on State selection and Locality based on City selection. I have observers on two fields (State, and City). The observer_field on state works fine and it populates city based on state selection. But the observer on city doesn''t populate Locality. Now sure whats wrong with my code. here is the
2005 May 17
5
Strings, Variables and GetText
Hi, I''m starting to use GetText and have this code: render_text %(<script language="JavaScript" type="text/javascript"> parent.mainframe.onUpdateNew("Gallery <b>#{@media.name}</b> was successfully created.", "#{@media.name}","#{String(@media.id)}","#{@media.media_type}"); </script>) I need to convert