similar to: Cross-Domain Data with Rack and Rails -- http://bit.ly/BNw6T

Displaying 20 results from an estimated 7000 matches similar to: "Cross-Domain Data with Rack and Rails -- http://bit.ly/BNw6T"

2011 Jun 03
0
Rack Middleware support for Rails 2.0.2? If not what is the alternative to implement similar functionality in Rails 2.0.2..
Hello all, I am using Rails 2.0.2 and Ruby 1.8.7 and I need to make use of rack middleware for integrating an ajax file upload plugin(https:// github.com/valums/file-uploader) with paperclip in Rails( As given in this tutorial:- http://mooooooooooo.wordpress.com/2010/12/03/paperclip-valums%E2%80%99s-file-uploader-and-middleware-continued/). I have referred to the rack-middleware Railscast by
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:
2012 May 31
1
Rack Middleware or after filter
Hi All I need an solution that i should catch response and based on some conditions i have to modify response body and send back to client. I have tried with a Middleware and got a solution.Can i use a Middleware or simply one after_filter. On performance wise which is best.Or is there any other ways to do it. thanks in advance. -- You received this
2014 Mar 27
0
Rack middleware for shared connection pools?
I have a Rails app that makes connections to other DBs. There may be multiple users connecting to multiple DBs. The app makes a database connection as part of an action. However, I noticed a problem: there's too many DB connections remaining open, which is causing the DB to not have enough connections remaining for new connections. So the answer is using a shared connection pool.
2009 Sep 22
4
rspec-rails and rack middleware
It doesn''t seem like my controller specs are calling my middleware on requests. Has anyone figured out a good way to test middlware with rspec? I''m thinking something like rails'' rails/actionpack/test/controller/session/mem_cache_store_test.rb but with rspec... any thoughts? Thanks! Best, Aaron -------------- next part -------------- An HTML attachment was scrubbed...
2010 Dec 10
0
Encoding issues when uploading files
Hello everybody, I have some troubles with uploading files in my Rails project. I use Rails 3, Ruby 1.9.2, rack 1.2.1, and both webrick / passenger on apache I was investigating and have isolated the strange behaviour on a simple empty project: view: <% form_tag({:action => ''upload''}, :multipart => true) do %> <%=text_field_tag :desc %>
2012 Jul 23
4
uninitialized constant ActionController::Flash::FlashHash [NameError])
My application, a very simple general ledger, that worked very well until June 26 does not work any longer. It is used under Ubuntu 12.04 and I believe there was a Ruby update after that. What happens? When I try to start the appIication I get the following output in my web browser: ActionDispatch::Session::SessionRestoreError Session contains objects whose class definition isn''t
2008 May 21
32
Rack, Camping 2.0++
=== 1. Camping on Rack === I''ve just finished rewriting Camping to use Rack in the "core". I got rid of (a little less) than 1kB in camping.rb and removed lots of un-necessary files (lib/server/*.rb, fastcgi.rb & mongrel.rb). bin/camping does now only provide WEBrick, Mongrel and console-support and should only be used in development. It uses Rack::ShowExceptions to catch
2013 Feb 10
0
Nested attributes doesnt get updated
Hi Am building a nested form and my code works fine with sqlite3 but throws errors when using Oracle during update action. Am getting the following error: ActiveRecord::RecordNotFound in AWRequestsController#update Couldn''t find WADetail with ID=5000000015 for AWRequest with ID=5000000022.0 Request *Parameters*: {"utf8"=>"✓",
2012 Mar 01
1
help stylesheet_link_tag
I was reading the book "Agile Web Development with Rails 4th Edition". In Chapter 11, Iteration C2: Adding a Page Layout 1 <!DOCTYPE html> - <html> - <head> - <title>Pragprog Books Online Store</title> 5 <%= stylesheet_link_tag "scaffold" %> - <%= stylesheet_link_tag "depot", :media => "all" %> - <%=
2013 Oct 29
3
rake db:migrate debacle
Hi there - I''m a ruby newbie and am stuck on the Getting Started with Rails app. See output below. Problem arose when I ran the rake db:migrate command. I also tried the ''rake db:migrate RAILS_ENV=development'' command which may be obvious. Any ideas on how to fix this? Many thanks!! $ ruby -v ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0]
2012 Apr 19
1
active admin undefined method `' for nil:NilClass
im working with active admin i have collection_select or dropdown box that populates the packages and crews im just wondering i why this undefined method `[]'' for nil:NilClass` i dont know what happened but it run few days ago and tested it once but now it raises this error are there possible way to solve this? def create @package = Package.find(params[:package_crew][:package_id])
2012 Sep 18
2
undefined method `to_sym' for nil:NilClass
Hi all, I am trying to upgrade my rails 2 app to 3 and am getting this error when trying to login: NoMethodError in AuthenticateController#authenticate undefined method `to_sym'' for nil:NilClass The stack trace is: activerecord (3.2.2) lib/active_record/validations/uniqueness.rb:26:in `validate_each'' activemodel (3.2.2) lib/active_model/validator.rb:153:in
2012 Apr 24
1
Rails 3 Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
Hi Guys, Facing a weird error . Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2) It seems to be happening with mail sending mail . I am using AUTHSMTP to send mails . Unable to send mail and the app breaks . Any help will be appreciated . Same code worked with ruby 1.8 and rails 2.3.x . *Configuration* Rails 3.2 Ruby 1.9 Engineyard , Linux Instance *Backtrace :*
2012 Apr 24
1
Rails 3 Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
Hi Guys, Facing a weird error . Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2) It seems to be happening with mail sending mail . I am using AUTHSMTP to send mails . Unable to send mail and the app breaks . Any help will be appreciated . Same code worked with ruby 1.8 and rails 2.3.x . *Configuration* Rails 3.2 Ruby 1.9 Engineyard , Linux Instance *Backtrace :*
2011 May 21
4
request.format = :mobile causes error "undefined method `ref' for nil:NilClass"
I have a strange problem with setting request.format = :mobile I can reproduce this problem on a completely fresh Rails 3.0.7 app with no special gems. This seemed to work well in Rails 2 but for some reason is hiccuping here, not sure what''s different in Rails 3 that makes this hiccup. If you look at the stack track, it doesn''t even pass through my app stack once -- weird --
2013 May 13
0
Middleware example from Railscast #151 doesn't work as expected. Need help.
My middleware class "ResponseTimer" doesn''t intercept a request. I don''t know why (the example is from here http://railscasts.com/episodes/151-rack-middleware?view=asciicast; I changed my one a little for Rails 3.2.13 version, the original is for Rails 2.x). So I did as follows: ## in \lib\response_timer.rb ## this is the class of my custom middleware: class
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
2010 Jul 29
0
want to get original url from short(i.e tiny,bit.ly etc) url
Hi all, I am using Expurrel gem to get the original url from the short url for all the url shortener services.It works good on the script/console and irb but it is throughing me error like "URI::InvalidURIError in KeywordsController#create" in my application after giving some no. of original url and its for "bit.ly" url shortener. So is there any solution for this or any
2006 Jul 28
1
How to set environment specific config variables DRY-ly
Sorry, search is down on the forum, so I don''t know if this has been posted elsewhere. I have some config variables that I want to have set in all environments, and overridden in production. What I want to do is put this in my config/environment.rb SOME_CONFIG = 555 And then override it in config/environments/production.rb as: SOME_CONFIG = 333 Problem is, using constants I