4
votes
0answers
63 views

save_and_open_page and spork, spork is loosing test suite / output

When i run my rspec tests with spork, every time i use capybara's save_and_open_page, spork is loosing the test suite.. or maybe doesnt output anything anymore... See the log # => without ...
3
votes
0answers
49 views

DBI::InterfaceError: Could not load driver (uninitialized constant MysqlError)

I have included gems, dbd-mysql (0.4.4) dbi (0.4.5) mysql (2.8.1) on rails console when I run the following code, require 'rubygems' require "dbi" require 'dbd-mysql' dbh = ...
3
votes
0answers
82 views

Newline gets prepended when sending form with Capybara

I have this test in a Rails app, using Capybara: within "#register" do fill_in "Biography (optionnal)", :with => "Hello world!" end click_on "Save" # Check that form is repopulated with old ...
3
votes
0answers
64 views

mongoid as_document error

I am using mongoid with devise invitable, after assigning roles to user I found the following error "**undefined method `as_document' for Array **" , any suggestions ? invitable = ...
3
votes
0answers
144 views

Resque and New relic

I've started getting strange errors with New Relic and resque INFO : Starting Agent shutdown ERROR : undefined method `write' for nil:NilClass: Unable to send data to parent process, please see ...
3
votes
0answers
282 views

Monitoring resque with monit with RVM

I previously had Monit monitoring resque with the following Monit script check process resque_worker_production_QUEUE with pidfile /var/tmp/resque_production.pid start program = "/usr/bin/env ...
3
votes
0answers
154 views

Generate yaml node anchors and references programmatically

I need to generate this yaml programmatically in Rails: foo: &foo x: 1 y: 2 bar: <<: *foo z: 3 which when it's parsed should give this hash: output = { :foo => { ...
3
votes
0answers
182 views

Why is my middleware leaking memory?

I've forked the rack-timeout gem so I could add some features -- namely, catching the incidents of timeouts, logging them, and sending a 503. Here's my fork. Here's the Rack app/middleware in my ...
3
votes
0answers
260 views

Rails Association Extensions: Override a HABTM assignment (collection=) method

In a question I've previously answered, I used an association extension to override a HABTM collection's append (<<) method (Also, a similar question): has_and_belongs_to_many(:countries) do ...
3
votes
0answers
159 views

Rails 2.3.14: How to serialise an ActionController::Request object?

I need to write some methods that Do Things based on the kind of request object received by a Rails 2.3.14 controller. However, I don't want to fire up the entire application, nor even a controller; ...
3
votes
0answers
869 views

Save PDF file shown by PDFKit middleware (Solution)

If somebody is interested in saving the pdf file in the filesystem which is shown by PDFKit middleware gem. Then here it is... 1. Override the 'call' method of middleware.rb file. 2. In overriding ...
2
votes
0answers
24 views

print ruby on rails backstraces/stracktraces/errorss in reverse order on the screen

Here is annoyance I have with strack traces in rails -- they print the error first which means to view any error, you have scroll up in your termanl to see what the error is. is there a way by which ...
2
votes
0answers
55 views

Rails blog using Mongoid - Auto generate Short URL on post creation

I have a simple blog engine using Rails and Mongoid ORM. I have 2 models in the blog, 'Article' and 'Url'. The Article model contains all of the post content, and the Url class is the generator ...
2
votes
0answers
28 views

Rails cart checkout with Wepay-rails gem, avoid opening security hole on return from checkout

I have been trying to setup the wepay-rails gem https://github.com/adamthedeveloper/wepay-rails with my rails app, and have been successful in doing so however I have realized that because of my ...
2
votes
0answers
34 views

Simulating sub-uri in RSpec tests

In my Rails 3.2 application controller responds with JSON containing an URLs to images (stored with Paperclip). It works ok locally,but links are broken on server, because the application is deployed ...

1 2 3 4 5 325
15 30 50 per page