similar to: RESTful route gives a 500 error when Content-Type is set

Displaying 20 results from an estimated 3000 matches similar to: "RESTful route gives a 500 error when Content-Type is set"

2007 Nov 06
2
what did I do?
I''m following merb trunk. This morning I updated my gems, sync''d merb source and installed the merb gem from source. I don''t know if I did something wrong, or if a new gem messed things up, or if there was a merb change which broke something. Now I get this error: Request: REQUEST_URI: / (2007-11-05 20:27:04) Params: {"action"=>"index",
2007 Sep 04
11
returning(...) ?
The following construct is an ActiveSupport-ism: returning(Foo.new) do |foo| ... end I don''t especially like it, since it''s both more verbose and less efficient than the direct alternative: foo = Foo.new ... foo It doesn''t occur many times in Merb, so does anyone agree with me that it should be removed? I tried doing this (patch attached) and I find
2007 Jul 18
2
Hash.from_xml
Hi, I''ve started looking at ticket 90<http://merb.devjavu.com/projects/merb/ticket/90>and there are a couple of situations that the current implementation doesn''t cater for. 1. Tag Attributes are wiped out. - <tag1 attr1=''1''>Content</tag1> #=> { "tag1" => "Content" } - I think it should return -
2007 Dec 19
3
Trapping custom exceptions in merb 0.5.0
Hi, I have the following setup: class Fred < Application class InvalidKey < Merb::ControllerExceptions::Unauthorized; end def blee raise InvalidKey unless key end end I have added a view exception template in views/exceptions/invalid_key.html.erb but I am not seeing the exception page being rendered ?? The request seems to correctly go to
2007 Nov 07
2
merb 0.4.0 session issue
Not sure if anyone else has had this problem. I was running on merb edge fine a few days ago. Last night I went to merb 0.4.0 via gem install and now any call to session[:foo] causes an error >> undefined method ''[]'' for nil:NilClass I have uninstalled and reinstalled merb with no luck. dependencies.rb use_orm :activerecord merb.yml :session_store: active_record Gems
2007 Oct 19
3
Stubbing a Kernel method?
Is it possible to stub a Kernel method? I''m specifically interested in the ''open'' method to test some code using open-uri. I''ve tried: Kernel.should_receive(:open).with(''filename'').and_return(''data'') However, this doesn''t seem to work. Any suggestions would be appreciated. --Paul
2007 Nov 12
0
Sessions broken in 0.4.0 (includes hotfix)
We''ve gotten several reports on #merb that each request gets a new session ID in 0.4.0. I quickly tested and verified. scoundrel tracked it down, and I think it''s fixed. If you need to apply this by hand to your 0.4.0 install, it''s a 1 line fix: Index: /trunk/lib/merb/controller.rb =================================================================== ---
2007 Sep 04
1
Couple of questions for Merb 0.4
All, I have just updated to the latest release of merb 0.4 and I am wondering how I can get my controller changes to reload without bouncing the server ? I am running in dev mode but my changes to my merb controller don''t seem to get picked up on new requests. Also say I have a controller that needs to render an alternate xml format ie something like:
2009 May 09
0
XMLRPC raw_post getting run through Hash#from_xml
Im trying to create an api, and Im having trouble getting ActionController to not run the raw post data through Hash#from_xml (request.parse_formatted_request_parameters) for the XMLRPC post data. I essentially want it to run through XMLRPC::XMLParser::REXMLStreamParser.new.parseMethodCall(request.raw_post). However, I can''t figure out a clever, clean way to get
2009 Jan 20
6
[Cucumber, Merb, Webrat] undefined method ''response'' for Merb::Test::World::Webrat
Hello! I get the following error everytime I try to check the result of previous step (by the way, I use default result_steps.rb): undefined local variable or method `response'' for #<Merb::Test::World::Webrat:0x7f083c7860b8> (NameError) ./features/steps/result_steps.rb:14:in ` /^the (.*) ?request should fail/'' features/authentication/login.feature:17:in `/^the (.*)
2008 Jan 18
5
How do I pass form values from POST controller specs?
Hi there I just started my first Merb app and I''m running into some weird things in Specs. When I do: describe "create action" do it "should create a new project" do project_params = {:name => ''bekkunin''} Project.should_receive(:create).with(project_params) controller, action = post(''/projects'', :project
2003 Sep 21
2
Incoming phone line rollover / hunt?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi All, I have a simple question about incoming phone line rollovers. How are these usually done? Is this done at the phone company usually, or is this something that Asterisk or channel bank is capable of? I just need someone to give me a brief explanation how it usually works, and if someone was implementing an Asterisk system, how they would go
2007 Oct 31
3
Mongrel breaking Merb?
Has anyone had troubles from Mongrel > 1.0.1? Just curious, because the last time I tried to run Merb it gave me some Mongrel error about the wrong number of arguments, or something like that. I can post the exact message tonight when I get home. -- Cheers, Kevin Williams http://kevwil.com/ http://www.almostserio.us/ http://kevwil.jaiku.com/
2010 Apr 05
2
Harmonizing JSON/XML serialization
The way Rails handles root nodes in JSON and XML serialization is inconsistent. This has been discussed before: https://rails.lighthouseapp.com/projects/8994/tickets/2584-232-activeresource-json-doesnt-send-parameters-with-root-node This seems mostly taken care of with ActiveModel::Base.include_root_in_json, especially if/when it ends up in ActiveResource. However, there is also the issue of how
2011 Mar 26
2
How to deserialize an array from XML
Hi, to serialize an array to xml we can use: an_array = [ 1, 2, 3] an_array.to_xml But to I can''t find a way to convert back XML to array. I didn''t find a method Array.from_xml like Hash.from_xml. Any ideas? Thanks, Gustavo -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email
2009 Feb 03
3
ROXML from_xml not returning an object instance...
Hello, I have two ActiveRecord classes. One is Route the other is Waypoints. I have constructed an XML representation so I can use AJAX to create a Route with all waypoints in a single create call to RouteController. When I call Route.from_xml(xmlString) it is not returning an object - it''s leaving the object (@route) nil, but not erroring. Any ideas? Here''s some code:
2007 Sep 21
3
merb 0.4.0 - redirect problems
I had redirects working just the other day... before I upgraded to the latest release. Can somebody please chime in as to why this simple redirect is throwing an error? Controller: ----------------------- def do redirect "http://www.ebay.com" end Error Output: ------------------------- Internal server error 500 uninitialized constant Merb::ControllerMixin::MovedTemporarily in
2007 Sep 18
10
Routes
hi all, I want to move some routing tasks out of the router and into the controller. The goal is to make Merb feel less like mod_rewrite and give the user more control at the controller. The new Router is simple: it takes the path_info (not the whole request) then outputs a controller class and some parameters from the path matching. The rest of the routing would be done at the controller level.
2007 Aug 31
3
Bootstrapping from SVN
Is there a simple way to bootstrap merb directly from the Subversion repository, rather than first installing it as a gem? I can do the following if I already have an old gem lying around: merb -g testapp # using an old gem cd testapp rake merb:freeze_from_svn Unfortunately, that means I''m using an old version of the generator. So for example, when I just tried this,
2007 Nov 13
1
nitpicking :)
The http://merbivore.com/get_merb.html#trunk page mentions the 0.4.0 version, but 0.4.1 is out. Is this a part of the site which will be constantly updated as part of the release cycle? The roadmap on merb.devjavu.com has outstanding tickets for 0.4.0 and 0.4.1, yet both versions are out. Were those issues fixed, or should they be bumped forward? Yeah, this is really anal crap, I know. I would