similar to: do I mount rack apps in Rails (3.1) for faster APIs?

Displaying 20 results from an estimated 10000 matches similar to: "do I mount rack apps in Rails (3.1) for faster APIs?"

2010 Mar 13
1
Testing file upload (Sinatra, RSpec, Rack-Test)
Hi. I have a simple application and I want to add a file upload functionality. How can I write a spec? Here''s my try. # directory structure app: - controller.rb - controller.spec.rb - files: [] - fixtures: [test_file.png] # controller.spec.rb require ''rack/test'' require ''controller'' module MyHelpers def app Sinatra::Application end end
2009 Mar 04
5
Sinitra 0.9.1 Webrat 0.4.2 Cuc problem
Have created sample sinatra cucumber app as suggested on wiki. Tried both env.rb configurations from there and aslaks git repo. With this combination of gems I get the following error doing basic cuc tests When I visit ''/foo'' # features/step_definitions/general.rb:1 PATH_INFO must start with / (Rack::Lint::LintError)
2013 Oct 09
0
getting selenium working with jruby/sinatra/cucumber/webrat on windows
I am trying to run cucumber/webrat with Sinatra on Jruby 1.7.3 (1.9.3) on Windows. It seems to work ok, but when I try to add selenium to webrat. I get the error shown below. It seems like it thinks it is in a linux environment or something as the error happens when it tries to start selenium server and there is a "&" at the end of the argument chain. I took a look at capybara
2010 Apr 23
2
Routing a Sinatra application
Hello, I wish to route a sinatra application in my Rails 3 app. As said by Yehuda, it should be possible. http://yehudakatz.com/2009/12/26/the-rails-3-router-rack-it-up/ However I see the route isn''t recognized and I get ActionController::RoutingError problems. It works well with simple rack apps however (the test in actionpack with a lambda passes well). I''ve written a test
2012 Sep 20
7
jQueryUI autocomplete (Rails 3.1): can't get source as url to work
Hey, I''m able to duplicate everything in Ryan Bates'' screencast on jQueryUI autocomplete (#102<http://railscasts.com/episodes/102-auto-complete-association-revised>), except for the piece that calls the server for completion data. Here is my view html: <input data-autocomplete-source="/searches" id="search-markets"
2011 Oct 11
3
[HW] Do the HDD cages in rack mount chassis indicate visual/audio HDD failure?
I have no personal experience with rack mount chassis. >From the past postings, I reckon there are members, in this list, who have experience in rack mount setups and would like get their advice. To reduce the H/W cost, I am considering Linux mdadm RAID10 on a 2U chassis. I would appreciate clarification on the following: In rack mount chassis, do the cages that house the hard disks have
2011 Jul 29
7
Rails and Service Oriented Architecture (SOA): any downsides?
Hey folks, I like what I''m reading about improved performance via Service Oriented Architecture for my Rails app. Stepping in that direction will require some code reorganization, though. Has anyone regretted the time invested in Rails SOA or suffered any other drawbacks that might -- from a business perspective -- have disinclined them from going SOA? Lille -- You received this
2012 Feb 01
0
How can I force Rails 3.2 to reload mounted rack app per request in development mode?
How can I force Rails 3.2 to reload mounted rack app per request in development mode? I have mounted grape <https://github.com/intridea/grape> app this way mount API2, :at => "/api2" However rails doesn''t reflect changes in app without web server restart. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2009 Aug 05
5
Logging out with Rake:Auth:Basic
Hi all, I''m writting a small app that requires basic authentication in Sinatra. I followed the advice of the official Sinatra faq (http://www.sinatrarb.com/faq.html#auth) and have implemented this code with success: [code] require ''rubygems'' require ''sinatra'' helpers do def protected! response[''WWW-Authenticate''] = %(Basic
2013 Jul 22
0
How to handle exception that is generated in rack middleware before it reach rails app?
I know that we can use config.exception_app to set up custom exception handling and also use rescue_from. However, I have an issue that there is malformed request (testing generated request) that caused Rails Rack middleware to throw an exception when Rack''s parse_query method. Here is the detail of the problem:
2010 Jun 14
3
How do I upgrade rack in my current rails app?
Hi, I have a rails 2.3.8 app which has rack 1.1.0. I get parse_multipart error. There''s a new release of rack 1.2.0 which might fix the multipart error. The question is how I upgrade the rack? I froze the rails. I did "gem update rack" and it upgraded rack to 1.2.0. But my rails app still uses rack 1.1. How do I set the rails app use rack 1.2.0? Thanks. Sam -- Posted via
2011 Aug 12
16
Rack content-length Rack::Lint::LintErrors errors with unicorn
Has anyone seen anything like this before? I can get it to happen all the time if I issue a HEAD request, but it only happens very intermittently on GET requests. I''m using Ruby 1.9.2p180. Any ideas on where to start debugging? 204.93.223.151, 10.195.114.81 - - [11/Aug/2011 21:03:50] "GET / HTTP/1.0" 200 37902 0.5316 app error: Content-Length header was 37902, but should be
2011 Mar 18
6
Could not find sqlite3
I am trying to get Ruby/Rails running on my mac but having some issues. I created a new rails project "blog_test" trying to get something working. When I follow this guide http://guides.rubyonrails.org/getting_started.html it says to do a "db:create". This is where I get this error... Could not find gem ''sqlite3 (>= 0)'' in any of the gem sources listed
2010 Jul 02
3
Ticket #5038 ActiveResource not handling updates correctly
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5038-activeresource-not-handling-updates-correctly I just added this ticket. I''m writing a Sinatra API to be consumed by Rails and I''ve run into an issue where the ActiveResource documentation specifies that on update you should return an HTTP 204 status with no body. The problem is that Rack doesn''t
2013 Aug 12
2
Passenger-Rack error 500: no such file to load -- rack
I have a puppetmaster running within passenger+rack. It has been running properly for almost a year and decided to stop working on the weekend. Now I''m getting the Purple "Ruby (Rack) application could not be started" screen with Error: no such file to load -- rack Application: /data1/rack/puppetmaster The backtrace is uninspiring. Snippets include:
2013 Jan 29
0
How to stub a class inside a module with Mocha in Ruby?
I know there are lot of questions in here around this. I''ve tried all of them but none of them works. Basically, I''m trying to stub TwitterOAuth::Client so my test won''t call the real api every time. Here''s the bit from TwitterOAuth gem that I use. module TwitterOAuth class Client def initialize(options = {}) @consumer_key =
2011 Apr 08
7
FileUpload without Tempfile
I am looking for a way to upload a file to Rails 3 app, but without generating a temp file. Googling the issue gave me some insight in how the file upload works. As I understand Rails creates a temp file when the file size is larger than 20kb. Is there a way to change this limit and avoid the temp file generation? Another solution I was looking in was creating a Rack App and so avoid the file
2009 Mar 29
5
Rack::Lint::LintError with latest camping and rack
I''m trying to use Camping from Magnus'' repo (1.9.300) but running the blog.rb example (or anything for that matter) gives me Rack::Lint::LintError at / Content-Length header was 0, but should be 548 Ruby C:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb: in assert, line 16 Web GET localhost/ There are no errors on the camping output so I suspect something has
2012 May 17
1
Update Rails on Rack documentation
The Rails on Rack documentation is still using the "ActionController::Dispatcher" class but it no longer exists, I can update the documentation, I just wanted to discuss what''s the best way to do it, I''ve tested with "run Rails.application" as well as with "run MyAppName::Application" (just like the generated config.ru file does it), what do you
2012 Oct 18
4
Rack env rack.multiprocess true with single worker
Hi, unicorn unconditionally sets rack.multiprocess to true in the Rack environment. The Rack spec [0] says the following about the variable: "true if an equivalent application object may be simultaneously invoked by another process, false otherwise." When unicorn is running with a single worker this does not hold so what do you think about setting the variable to false when only a