search for: nameerror

Displaying 20 results from an estimated 718 matches for "nameerror".

2008 Apr 26
1
gem fetching error
...9;'gem update''. The latter gives the following error (the same error is replicable when I try any ruby applications): # gem update --debug Exception `Errno::ENOENT'' at /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:51 - No such file or directory - /root/.gemrc Exception `NameError'' at /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:145 - uninitialized constant Gem::Commands::BuildCommand Exception `NameError'' at /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:145 - uninitialized constant Gem::Commands::CertCommand Exception `NameError'...
2007 May 26
11
RSpec
...eceived: 330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec (in /Users/multimedia/Desktop/restful_auth_rspec) /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in `load_missing_constant'': uninitialized constant ActiveRecordMatchers (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing'' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in `const_missing'' from ./spec/models/aut...
2006 May 02
3
''NameError: uninitialized constant <MyEntity>'' in console
When I create a new model entity, and try to access it from the Rails console I get the error: >> b = Bar.new(:name => ''Some Bar'') NameError: uninitialized constant Bar from (irb):1 from :0 (My model class is called Bar, and is in file app/models/bar.rb) So, I try to load the model class file, and I run into a more frigtening error: >> load ''app/models/bar.rb'' NameError: uninitialized constant...
2008 Nov 28
3
Beginner: "NameError - uninitialized constant" when I create a model object
My first Rails example using model and I got this NameError: NameError in VandaController#att uninitialized constant VandaController::Compute Same code works fine if I don''t create the Compute object. What did I do wrong? Here is the Controller class VandaController < ApplicationController def att @compute = Compute.new @data1 = @co...
2005 Mar 02
1
404 and NameError
...ept for 404 pages. The thing is that if I give a non existent path, I get the correct 404 error page back. However if I request a non existent file such as test.php (in fact anything non existent that isn''t a path really), I get a rails application error message on the screen and also a NameError in the logs. I''ve tried catching NameError for non local IP''s, but this doesn''t seem to get caught for some reason. NameError (wrong constant name test.phpController): /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.0/lib/active_support/dep endencies.rb:95:in `co...
2009 Aug 31
3
NameError: undefined local variable or method `testapp' for main:Object
...======== class sample_class def sample_method puts "sample program" end end myclass = sample_class.new myclass.sample_method ======================== Now when I give command (To run the application) "ruby testapp.rb" , I get this error "NameError: undefined local variable or method `testapp'' for main:Object". I believe, the irb is not able to recognize any .rb file. Can anybody help me with this? Additional details:- location of irb - D:\RoR\ruby\bin location of testapp.rb - D:\RoR\ruby\bin Many thanks in advance!
2006 May 27
2
NameError / active_support/dependencies
hi everyone in my dev machine, everything works flawlessly now when i uploaded my website on the server, it cannot acces User model anymore. all other pages work by the way. when i try to access User on console or by web, it shows: NameError in UsersController#signup uninitialized constant User /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' /usr/lib/ru...
2007 May 03
1
unexpected failures with --reverse
...o @bill = nil @date = nil end end ---------- And here is the output when I run the spec using the stock 0.9.2 spec.opts via ''spec -O spec/spec.opts spec/models/bill_spec.rb'' (it also fails when I run it via ''rake spec:models''): ---------- FFFFFFFFF 1) NameError in ''Bill should return self.date.year when asked for :year'' undefined method `date'' for class `Bill'' ./spec/models/bill_spec.rb:71: 2) NameError in ''Bill should return self.date.month when asked for :month'' undefined method `date'' for...
2008 Jan 18
2
NameError when using alias_method -- but method exists?
...ule YAML >> alias_method :orig_load_f, :load_file >> def load_file(*args) >> contents = orig_load_f(*args) >> contents.symbolize_keys.each_value {|v| v.symbolize_keys } >> end >> end But after that last ''end'', irb explodes, saying: NameError: undefined method `load_file'' for module `YAML'' from (irb):2:in `alias_method'' from (irb):2 But, continuing in irb: >> #But apparently that NameError is not true? ?> YAML.load_file(''test.yml'') => {"node_three"=>...
2009 Oct 13
2
Single Table Inheritance (STI) Broken: NameError
Some how I''m getting NameError: uninitialized constant when accessing a child models that inherits form the parent model. However, if I access the parent model first, then the child model is resolved. What am I doing wrong? My steps are below... Thanks, Francis. > ./script/generate model Blah type:string class CreateBlah...
2006 May 05
1
NameError when running exception_notification plugin?
Hi all, I installed the exception_notification plugin via ''script/plugin install'', and when configure it and try to run it, I get: NameError uninitialized constant ExceptionNotifiable This error occured while loading the following files: application.rb exception_notifiable.rb In my application.rb, I added this: include ExceptionNotifiable And in my development environment file, I added: ExceptionNotifier.exception_recipi...
2006 Mar 12
0
NameError when trying to combine Recipe 14 (rich HABTM) & Rec. 10 (self-ref HABTM):
Hi all, I''m trying to model self-referential relations between people, where the relation has attached data. John ''works for'' Bob Problem: '':through'' doesn''t work, and generates a NameError. => the models : Person (attr: name) Relation (attr: source_id, target_id) (more details below) ex: John ''works for'' Bob 1> jsmith = Person.create(:name => ''John Smith'') 2> jdoe = Person.create(:name => ''John D...
2006 Feb 07
1
AWDWR: NameError (uninitialized constant UnknownAction) in rescue_action_in_public
...er :template=>''/error'', :layout=>''application'', :status=>''500 Error'' end Notifier.deliver_exception(self, request, exception) end It works, except when an ''unknown action'' occurs, then it displays this in the log: NameError (uninitialized constant UnknownAction): /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.rb:200:in `const_missing'' .//app/controllers/application.rb:63:in `rescue_action_in_public'' Any idea what the problem is? Thanks csn _____________...
2006 Nov 06
1
NameError uninitialized constant Ferret::Index::FieldInfos
...e . I''m using the find_by_contents to get the search results. I''m getting the following error. I''ve no clue and I didn''t find any previous posts discussing this issue . I''ll really appreciate if any of you can point out what I might be doing wrong. NameError in MaintenanceController#search uninitialized constant Ferret::Index::FieldInfos RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace vendor/rails/activesupport/lib/active_support/dependencies.rb:260:in `load_missing_constant'' vendor/rails/activesupport/lib/...
2006 Jan 31
2
NameError/Unitialized Constant With PayPal Gem
...d having a little trouble. I installed the gem w/o any trouble: paypal (1.0.1) Paypal IPN integration library for rails and other web applications When I try to use it in my controller, as follows: def paypal_ipn notify = Paypal::Notification.new(request.raw_post) ... end I get a NameError: uninitialized constant Paypal This error occured while loading the following files: paypal.rb Like it can''t find the gem files... I looked and the gem is in place and the files are all intact. Am I doing something wrong? Did I mistype something that I''m missing? I''...
2012 Jan 04
0
xen-api_1.3-14_amd64.changes REJECTED
Reject Reasons: xcp-xe_1.3-14_amd64.deb: deb contents timestamp check failed [<type 'exceptions.NameError'>: global name 'MTime' is not defined] xcp-squeezed_1.3-14_amd64.deb: deb contents timestamp check failed [<type 'exceptions.NameError'>: global name 'MTime' is not defined] python-xenapi_1.3-14_all.deb: deb contents timestamp check failed [<type 'excepti...
2012 Jan 08
0
xen-api_1.3-15_amd64.changes REJECTED
Reject Reasons: xcp-xapi_1.3-15_amd64.deb: deb contents timestamp check failed [<type 'exceptions.NameError'>: global name 'Name' is not defined] libxenapi-ocaml-dev_1.3-15_amd64.deb: deb contents timestamp check failed [<type 'exceptions.NameError'>: global name 'Name' is not defined] xcp-v6d_1.3-15_amd64.deb: deb contents timestamp check failed [<type 'except...
2009 Mar 18
1
uninitialized constant ActionController::AbstractRequest (NameError) with rails 2.3
Hi guys, I''ve just installed Rails 2.3 and I am using the clearance plugin with cucumber features. When I run rake features I get this "uninitialized constant ActionController::AbstractRequest (NameError)" error from webrat trying to call AbstractRequest which now is called Request (I think). My question is : Is there any way to alias the old name to have backwards compatibility with plugins using it ? Thanks, Cezar --~--~---------~--~----~------------~-------~--~----~ You received this mess...
2009 Apr 15
1
uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
I''m on debian etch w/ ruby1.8, activesupport-2.3.2, getting this on the first line of code which is require ''active_support'' : /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'' from /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support.rb:56 from /usr/lib/ruby/1.8/rubygems/custom_require...
2010 Sep 21
1
NameError: uninitialized constant Dispatch
In the "Rails Way" book, following an example, I came to a point where I had to run: Dispatch.dispatch But, I get the following: irb(main):003:0> Dispatch.dispatch NameError: uninitialized constant Dispatch from (irb):3 I want to mention that I''m using "Rails 3.0.0", and the book seems to use an older version of Rails, is that the issue? What is the command that I should run in this case? Thanks. -- Posted via http://www.ruby-forum.com/....