similar to: rspec throws exception (nameError)

Displaying 20 results from an estimated 1000 matches similar to: "rspec throws exception (nameError)"

2007 Oct 02
3
Note on Rails 2.0 Preview
Make sure you get a relatively current version of rspec or you will get: /Users/me/rails/ubb/vendor/rails/activerecord/lib/../../activesupport/ lib/active_support/dependencies.rb:263:in `load_missing_constant'': uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper (NameError) Hope this helps someone.
2007 Apr 12
4
Installing rspec in Windows
Hi all, I''m trying to install rspec and I''m having a problem. C:\Users\Nathan\Documents\rails\myproject> gem install rspec Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed rspec-0.8.2 Installing ri documentation for rspec-0.8.2... Installing RDoc documentation for rspec-0.8.2... C:\Users\Nathan\Documents\rails\myproject> ruby
2007 Nov 01
3
autotest debugger?
Hi, I keep facing problems with autotest, and I don''t know what''s happening in the background, is there anyway to know what''s happening while testing? Example: @user = User.new @user.email = "testcom" @user.errors.on(:email).should_not be_empty ...throws error failure - You have a nil object when you didn''t expect it! - You might have expected an
2007 Nov 25
4
is notify resevered word?
Hi, When I added this association... class User < ActiveRecord::Base has_one :notify end ...and tried then to update column in User table it will call queries for notify table automatic? Output --------------------------------------------------------------- User Columns (0.041488) SHOW FIELDS FROM `users` User Load (0.001544) SELECT * FROM `users` WHERE (`users`.`nickname` =
2010 Sep 09
17
formtastic issue
Hello, I will try to explain it step by step :-) I just created a new rails 3 app, then I created a new controller... rails generate controller admin::users I didn''t forget to add the resources in the routes.rb file like this. namespace :admin do resources :users end Now I try to use formtastic to create the form but I get erorr that my users_path doesn''t exist?
2007 May 06
2
render :action "call method first?"
Hi, I know when I call: render :controller => ''some'', :action => ''thing'' It doesn''t call the method ''thing'' before render the template ''thing.rhtml'', but I need some instance variable which are in the ''thing'' method, how can I let it call the method ''thing'' and then render
2007 Mar 27
6
how does rails do this "find_by_?"
Hello there, I''m wondering how do they create functions on the fly? find_by_any_column_name ?? I want to do something similar with my models, but I don''t really know how to do it? user_current_nickname user_current_id user_current_role etc.? Regards, Jamal -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2007 Sep 07
5
enforce mutual exclusivity
Hi, First post, please be gentle! I couldn''t find any mention of this already I''m using ActiveRecord and I want to enforce mutual exclusivity on a has_and_belongs_to_many. A concrete example: I have a User which can have one or more Roles (student, tutor, headmaster, administrator etc). However if a user is a student they cannot hold any other role. I was hoping to find
2008 Jan 18
2
Rspec problem in testing RoR application
Hello. I install gems rspec and rspec_on_rails I have this Error when try to run Rspec tests on my RoR application: /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:263:in `load_missing_constant'': uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper (NameError) And I follow recipes wich are placed in
2007 Mar 29
4
validates_length_of not working with :if ?
Hello, I''m trying to cut down the errors if the guy already getting the empty nickname, so he doesn''t get anything about the nickname is short. validates_presence_of :nickname This below is not working ? validates_length_of :nickname, :within => 4..40, :if => Proc.new { |user| user.nickname.length > 1 } nor this one below? validates_length_of :nickname, :within
2007 Sep 21
1
Do fixture_scenarios and RSpec peacibly coexist?
Railsters: I just installed fixture_scenarios ... http://fixture-scenarios.googlecode.com/svn/trunk/fixture_scenarios ...into a project with some RSpec specifications. They all went kablooey. I didn''t even create a scenario; the system just started calling its version of fixtures(). The normal tests pass and the RSpec ones unanimously emit: TypeError in ''Context (verbose
2007 Sep 27
0
fixture_scenarios in trunk
Hi, I saw a previous post from David answering someones question about fixture_scenarios with rspec. Following that I upgraded my rspec and rspec_on_rails to the trunk versions and then installed the fixture scenario plugin. Now whenever I run my (previously passing rspecs) I get the following error for all tests... ... 148) NoMethodError in ''Cart should show a
2007 Mar 01
1
RoR: Torrent Tracker
Hello their, I managed to find torrent tracker made in RoR language, now I downloaded and trying to run it, but I get error saying: Could not find RubyGem bencode (>= 0.0.0) I don''t know where i can get the bencode, anyone can help please :) require_gem ''bencode'' regards, Jamal -- Posted via http://www.ruby-forum.com/.
2008 Nov 11
1
Admin controller
This is very weird behavior for rails. 1. When I visit my app http://localhost:3000/admin/base/login class Admin::BaseController < ApplicationController def login render :text => "running" end end 2. but when I go here http://localhost:3000/ I get error because login.html.erb not found 3. even though my route looks like this. map.root :controller =>
2007 Aug 21
2
validates_acceptance_of (and hidden input)
Hi Why does a failed "validates_acceptance_of" create a hidden input in the view? cheers, jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this
2007 Oct 08
2
flash messages?
Hello, I''m using flash[:hash] in my application, and I feel like I''m forced to make a redirect just to be sure that flash[:hash] doesn''t appear in any other views? flash[:notice] = "ASDDD" redirect_to :action => :another_method_name else flash[:error] = "DSADS" redirect_to :action => :same_method_name How do you solve this problem, to be
2007 Oct 22
13
An error on edge at -r 2767
Morning, Having done an svn up this morning all my specs are broken with the following: SQLite3::SQLException in ServiceConfig with minimum set of valid parameters should return nil for the service path'' SQL logic error or missing database C:/development/sandbox/prototypes/user_admin_client/config/../vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/rails_example.rb:17:in
2007 Apr 29
2
Validate unique within date range?
I''m setting up a simple system for listing products and specials. I''m looking for a way to validate that only one special can exist per product per date range. For example, if a product is on sale from 2007-04-29 to 2007-05-10, you cannot create a special for that product that starts on 2007-05-09. What''s the best way to do this with Rails? I''m fairly new to
2007 Oct 13
5
default date for date_select
Hi, How can I set a default date for a date_select? I''m trying to do something along the lines of: <%= date_select("requirement", "target_date", :end_year => 2020, :discard_day => true, :include_blank => true, :order => [:month, :year], :default => {:month => 10, :year => 2012 }) %> but the default that comes up on the form is blank month
2006 Aug 06
1
Where is ActionController::InPlaceEditing?
I can''t find this doc anywhere, but the JavaScriptMacrosHelper doc mentions it. Jose -- Posted via http://www.ruby-forum.com/.