I am working in a new rails application and I created a small utility class in RAILS_ROOT/lib. I use this class in a controller with require. This class is loaded correctly locally, but when I depl
Tag: rails
Ruby-on-rails – How do I find the maximum concurrent process you can create?
I use REE to run passengers on the Rackspace cloud server. Is there a way to find out the maximum number of concurrent processes that passengers can create/process using the provided infrastructure
Ruby-on-rails – SPORK is automatically restarted
I use spork as my DRB and auto-test as my observer to speed up testing in my Rails application. Currently, when the files in the directory structure change, autotest will restart the test.
Is there a way to restart spork after adding a new model? That is, restart spork when the directory structure changes.
Ruby-on-rails – rails 3 Select different sequences by the number of occurrences
In one of my models, I have a country column. How would I choose the top 3 countries/regions based on the number of models in that country/region? without any further information, you can try th
Ruby-on-rails – No file to be loaded – JSON (first request only)
As the title suggests, I only receive this error when I request the application for the first time. Subsequent requests work fine. This is on several machines where I am running the application Hap
Ruby-on-rails – Call the controller from the application layout
I have this code in my posts/index view:
-tag_cloud(@tags, %w(css1 css2 css3 css4)) do |tag, css_class|
= link_to tag.name, {:action => :tag, :id => tag.name }, :class => css_class This Is m
Ruby-on-rails – When you accept the test and track BDD, are you asserting the database change or what you see?
I use Steak for acceptance testing on a Ruby on Rails application. Imagine I want to test the functionality of a form.
>If all fields If everything is correct, the user should be created.
>If
Ruby-on-rails – How do I prohibit running code in the development environment on Rails?
How do I delete code when my Rails application is in development mode? For example, I want to delete my Google Analytics reference during development, but render it in a production environment.
Ruby-on-rails – Why is Ary.each to dump all content of the object?
foo is an array of objects, and bar is an attribute of the object.
(rdb:1) foo .bar.map{|v| bar.v }
[“a”, “b”, “c”, “d”, “e”, “f”]
< br />(rdb:1) foo.bar.each{|v| p bar.v }
[massive outpourin
Ruby-on-rails – RSPEC can output a value that makes test failure?
I have this statement:
@obj[:attribute].eql?(“TestValue”).should be_true If not just tell me the test failed, it will tell me it failed, because @obj[:attribute] is zero or 1234 or what it is