Displaying 20 results from an estimated 500 matches similar to: "Functional Tests Fail - No URL can be generated for hash"
2006 Jul 24
1
All functional tests fail with RoutingError
All,
I''m using InstantRails 1.0 on Windows XP and all my functional
(controller) tests fail with ActionController::RoutingError, although
the actions work OK through a web server/browser. Here''s an example of
an error:
1) Error:
test_create(AdminControllerTest):
ActionController::RoutingError: No url can be generated for the hash
{:controlle
r=>"admin",
2006 Jul 05
1
Routing error "unitialized constant" after refactoring
Hi. I''ve heavily refactored an application. When I access
http://0.0.0.0:3000/ I now get the stack trace at the end of this mail.
My routes.rb:
ActionController::Routing::Routes.draw do |map|
map.connect '''', :controller => ''user/dashboard'', :action => ''boo''
map.connect '':controller/:action/:id'',
2010 Apr 05
3
syntax error, unexpected '\n', expecting tASSOC
Hey all,
I get the following error. Now I know it''s related to a curly brace, but
it seems that all curly braces are properly in place. So I''m not sure
why I get this error:
SyntaxError in DashboardController#panels
rails/app/controllers/dashboard_controller.rb:170: syntax error,
unexpected ''\n'', expecting tASSOC
def panels
addDetailToContainer =
2006 Mar 26
2
Controllers in modules, not recognised - driving me mad!
Hi, I hope somebody can help me here but I''m having a very strange
problem getting Rails to recognise controllers inside modules. The
strange thing is, it was working the other day and I''ve not changed
anything as far as I''m aware. I''m running on OSX using Ruby 1.8.4 and
Rails RC1 (but I''ve also tried rolling back to Rails 1.0 and tried Edge
Rails)
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
This patch creates the shell for much of what the cloud ui will
become. It is focused on layout (lightly fedora themed), accessibility,
and 'bookmarkability'. This layout uses no javascript (that will be
used to enhance interactivity in a future patch). It also introduces
the idea of using a simple table rather than the more conplex js/json
we use in the admin side. Plan here is to
2006 Feb 27
0
Mapping '':action/:id/:controller/'' doesn''t work
Hello People,
(I am not good at ROR yet. This post could be very lame.)
I am going playing with routes.rb.
Well, pretty much any combination of mapping works, a part from:
map.connect '':action/:id/:controller/''
In this case, the request is routed; however, I get:
---------------------------------------
Showing app/views/inputs/start.rhtml where line #8 raised:
No url can be
2008 Jan 12
0
Can't test application controller methods in functional tests?
I have two methods in application controller that I want to test from
ForumController:
-----------------------
class ApplicationController < ActionController::Base
...
def logout
session[:username] = nil
session[:admin] = nil
redirect_to(request.request_uri)
end
...
def home
redirect_to(:controller => ''forum'', :action =>
2006 Apr 23
37
Newbie .. nil object and missing something obvious
Trying to do first project in Ruby on Rails, and I''m getting the dreaded
nil object exception. I''ve reduced the code to what I think is the
minimal case, and it''s still not working. Code presented below..
----------------------------------------------------------------------
in "app/controllers/dashboard_controller.rb"
class DashboardController <
2005 Oct 10
1
ActionPack tests are failing
Hi,
i''m currently looking into a problem with the tests for ActionPack. 127
of them are failing on my windows machine. On Linux everything is
working fine so far. I just wasted a good part of an hour trying to find
the problem on windows...the solution is: Nitro and not Windows.
I''m using Edge Rails and have no rails gem installed. On Windows I have
the Nitro/Glue/Og gems
2007 Oct 04
1
PUT- or POST-ing xml
I''d like to write a test of a REST service wherein XML is submitted as the
request entity.
In Test::Unit on Rails, this seems to be possible in an integration test,
but not in a functional test. RSpec uses the Rails functional test
framework, as far as I can tell, so it suffers the same result; it tries to
symbolize the keys of the ''parameters'' hash, except the
2006 Apr 27
1
Ferret crashing Ruby
I''ve gotten several problems with C ferret crashing ruby. Here''s the
stack trace of my latest case:
#0 0x00000050 in ?? ()
#1 0xb74028ab in iw_close (iw=0x8685a40) at index_rw.c:947
#2 0xb7414359 in index_destroy (self=0x829ebc0) at ind.c:89
#3 0xb73f00bc in frt_ind_free (p=0x829ebc0) at r_search.c:1564
#4 0xb7f04dca in rb_gc_call_finalizer_at_exit ()
from
2006 May 09
1
name_url in tests
Hi there,
I posted earlier asking about testing named routes in functional tests, but got no response, so I''m making my question less specific.
It seems from the docs that it''s possible to to test named routes in cases such as:
asserts_redirect_to name_url(:param => "whatever")
but I haven''t seen any mention of it being used with any other tests and I keep
2006 Mar 01
1
assigns() method disappeared from test_process.rb
I just noticed that the assigns() method has been dropped from
action_controller/test_process.rb
(http://dev.rubyonrails.org/changeset/3724). Was this an oversight or
is there a new process for working with controller instance variables?
--
* J *
~
2006 May 08
0
testing named routes
Hello,
I''m trying to test routes named within a map.with_options statement.
I have in routes.rb:
map.with_options :controller => ''films'' do |f|
f.overviews ''films/:index'', :action => ''index'', :requirements => { :index => /index(artist|date|title)\.html/ }, :index => ''new''
etc...
end
and
2006 Feb 01
3
Testing components
I''m using template components to modularize an application I''m working
on and am really happy with the way it''s going. Unfortunately, all my
attempts at writing functional tests for them fail. Trying to duplicate
my normal controller tests I have:
require File.dirname(__FILE__) + ''/../test_helper''
require File.dirname(__FILE__) +
2007 Feb 05
0
How do I use a RESTful helper with path_prefix?
Once upon a time I had this in my routes.rb:
map.client_home '':client/'', :controller => ''orders'', :action =>
''new''
All orders must be scoped within a client name, so this worked quite
well. I used a before_filter to scoop up the @client object by doing
a find_by_name.
Then I decided to expose the OrderController as a fully restful
2005 Feb 08
2
test_process.rb => LoadError
Line 4 and following of test_process.rb reads:
if defined?(RAILS_ROOT)
# Temporary hack for getting functional tests in Rails running under
1.8.2
class Object #:nodoc:
alias_method :require_without_load_path_reloading, :require
def require(file_name)
begin
require_without_load_path_reloading(file_name)
rescue Object => e
2006 Jul 07
4
Controllers - model vs. use case centric
I am working on a reasonably large application (which happens to be my
first with rails).
I was hoping to get some input on organisation of controllers and
actions.
I am finding having used scaffolding more at the beginning my
controllers tend to be very model centric, in that they mostly contain
all the actions for management of that particular model, which may crash
across multiple use
2006 May 06
0
RE: Rails Digest, Vol 20, Issue 156
I am looking for a ruby hosting service. Can any one recommend one for me.
-----Original Message-----
From: rails-request@lists.rubyonrails.org [mailto:rails-request@lists.rubyonrails.org]
Sent: Saturday, May 06, 2006 7:37 AM
To: rails@lists.rubyonrails.org
Subject: Rails Digest, Vol 20, Issue 156
Send Rails mailing list submissions to
rails@lists.rubyonrails.org
To subscribe or
2006 Jan 10
2
Make link_to_remote call redirect current view, not read redirected content
Hello everyone !
I have a link_to_remote which creates a Party from a ContactRequest.
The action on the server creates the party, marks the contact request
as processed, and then returns a redirect. According to my knowledge
of HTTP, that is the correct thing to do.
Unfortunately, Prototype is being too clever for me at this time...
It follows the redirect, without notifying me. Anybody has