similar to: Rails 3.0.6.rc1

Displaying 20 results from an estimated 500 matches similar to: "Rails 3.0.6.rc1"

2011 Mar 22
2
Problems with SQLite3
Hi! I''ve got a very strange problem. Suddenly the SQLite3 Backend stopped working. Example 1: > rake db:rollback == CreateProducts: reverting ================================================= -- drop_table(:products) rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: near "CASCADE": syntax error: DROP TABLE
2006 Jun 08
5
Field names in validators
Hi! Is there a (simple) way to use alternative field names in validation messages? For example, if I have a validator like this one: validates_presence_of :email how can I make it print a message like "E-Mail Address can''t be blank" instead of "Email can''t be blank"? I can override the "can''t be blank" part by using the :message
2011 Mar 03
1
Does RSpec interfere with Pathname#dirname or Pathname#realpath ?
Hi, I starting a new project, and have run into behavior I cannot replicate in irb, (i.e. outside of using rspec) when the directory? returns true, so I thought I''d ask here, in case any one has seen this badhavior. ruby-1.9.2-p136 rspec (2.5.0) rspec-core (2.5.1) rspec-expectations (2.5.0) rspec-mocks (2.5.0) When I try to run this spec: require Pathname(__FILE__).ascend { |d|
2010 Sep 10
10
current_page? inside controller
Is there any easy way of using something like current_page? method from ActionView::Helpers::UrlHelper inside controller ? I have routing like: resources :addresses resources :mailing_addresses, :controller => ''addresses'' And I would like to do a check in my controller that would look like this: class AddressesController def index if current_page?(live_addresses_path)
2011 Apr 12
4
OS X - `require': no such file to load -- sqlite3/sqlite3_native
I''ve searched and search, tried a number of things like unstalling sqlite3 and reinstalling. Reinstalling Rails, building sqlite3 from source, etc. Nothing seems to work. When I try to start up my server I get the following: MacBook-Pro:splash Ross$ rails server /Volumes/Macintosh HD/Users/Ross/rails_projects/splash/json/ruby/1.9.1/gems/sqlite3-1.3.3/lib/sqlite3.rb:6:in
2011 Feb 06
1
Psych can't load LaTeX entities file
Hi there, I wanted to use RedCloth with my RubyOnRails 3 application, but it seems that RoR uses 1.9.2''s Psych by default as the YAML parser if available, and Psych fails to load the LaTeX entities file: ==================================================================== #ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux] irb(main):001:0> Dir.pwd =>
2011 Feb 28
4
best_standards_support
File ./lib/rails/generators/rails/app/templates/config/environments/development.rb.tt: # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin File ./lib/rails/application.rb: middleware.use ::ActionDispatch::BestStandardsSupport, config.action_dispatch.best_standards_support if config.action_dispatch.best_standards_support What''s
2011 Jun 17
7
Encoding
What''s a good solution for fixing character encoding problems for compatibility between ascii and utf-8? The database is postgres and is encoded in utf-8. Once in awhile there will be a compatibility error from strings from a webform. Is there a command to fix this besides using a_string.force_encoding(''utf-8'')? Even this doesn''t seem to always work either.
2011 Feb 06
2
Controller Testing + Devise = boom (undefined @controller, request)
Here I am, trying to learn TDD and BDD. Getting start, most simple case, and the world is falling apart: My test code: it "should respond with success" do puts ''hi'' # get :new # response.should be_success end My stack trace: $ rspec spec "controller: nil" F Failures: 1) VideosController new exposes request and response before and
2011 Feb 10
8
rvm install 1.8.7 prompts "There has been an error while running make. Halting the installation."
I want to work with both Rails 2 and Rails 3 projects. I have RVM installed. When I upgraded to Rails 3, Installed RVM via terminal: bash < <( curl http://rvm.beginrescueend.com/releases/ … ll-latest) version=$(curl http://rvm.beginrescueend.com/releases/ … sion.txt); mkdir -p ~/.rvm/src/ && cd ~/.rvm/src/ && curl -O http://rvm.beginrescueend.com/releases/ … on}.tar.gz |
2010 Oct 02
2
How to write a test hash for a nested form??
How to write a hash for a nested form?? Example form fields (main model is Practice, nested is User): practice[name] practice[users_attributes][0][email] I want to do this: post: post :create, :practice => { :name => "any name", :users_attributes => { :0 => { :email => "anyone-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" } } } The issue is that I can not create
2007 Dec 05
5
Active Record, Migration, and Translation
Hi, I think the columns and table in migration should be able to have an optional "display_name" set manually. Something like: create_table :people, {display_name => "Personne"} do |t| t.column :first_name :string, :display_name => "Prénom". end Let me explain my point of view: Rails is a framework made to write programs in English. You see it when you
2011 Oct 25
1
Customizing errors
Hello fellow Rails devs, I had a slight problem with validation messages. I had a Post AR model that has an :author_name attribute. Now if a validation goes wrong, I would like the message to say: "Name of author can''t be blank" as opposed to "author name can''t be blank". I have tried looking into the Rails Guides for I18n #5 but it seems
2010 May 26
25
Extremely slow start up with ruby 1.9.1 vs 1.8.7
I created a fresh new rails app, no gems, no nothing. Completely unmodified. Doing anything that initializes rails takes 2 - 3 times longer in ruby 1.9.1 than it does in 1.8.7. Obviously with a fresh rails app, this is only 2 - 3 seconds extra. But with a decent sized app, this can take up to 25 seconds for rails to initialize, vs the 12 seconds in 1.8.7. I''ve been racking my brain on
2011 Jan 10
2
Problem with multiple requires in Ruby DSL
I''m loving playing around with the DSL. There are some problems (ie 5237), but now that it''s Ruby, I can fix them! woo! However, I''m stumped on this one, which may or may not be related to the DSL. When trying to have a resource have a simple dependency on two things at once, it simply fails, and I''m stumped as to why. The error message is: Parameter
2011 Jan 23
2
How I do to run Rails on Apache?
Scenario: Windows Vista - Rails 3.0.3 - Rub(ies)1.9.2-p136 & 1.8.7p330 - MySQL5.5 - Apache2.2 - git/cygwin -everything setup and working, BUT WEBrick is becoming temperamental. I want to run Rails on Apache. Is it possible? What should I do. I made some simple tests like build applications with Ruby 1.9.2 and after with 1.8.7. Rails on WEBrick set the tables and makes the models/ migrations
2011 Mar 18
2
How do I delete multiple blank variables from a data frame?
Dear List Members,I have 55 data frames, each of which with 272 variables and 267 observations. Some of these variables are blanks but the blanks are not the same for every data frame. I would like to write a procedure in which I import a data frame, see which variables are blank, and delete those variables. My data frames have variables named P1 to P136 and Q1 to Q136. I have a couple of
2012 Sep 19
7
Renaming Journey and avoiding libraries with common noun names
Hi all, I know this is a long shot, but could renaming the "Journey" module please be considered by those in a position to support it? I''ve written an issue on this in the journey repo also: https://github.com/rails/journey/issues/49 Essentially our project has a model named Journey, the same as Rails 3.2''s new routing driver. As a consequence we can no longer
2010 Aug 17
6
Overly aggressive constant unloading of Rails 3.0
In Rails 3.0 (both RC and edge), any constant that''s defined while loading a file in development mode will get unloaded on each request, regardless of whether it comes from an autoload path in the application or from external code such as a gem. Example file (tested on a fresh edge app): # kittens.rb require ''nibbler/json'' # "nibbler" is a gem specified
2007 Sep 21
3
multi_score?
Hi! I''m using acts_as_ferret in my rails project and i need to order the search results by a combination of the result given by ferret (score) and a ranking in the database (normalized also). this combination can be like that: 0.4*ferret_score+0.6*database_score this database_score is also indexed any idea? and someone know how to access the ferret data in the object returned by