If I do sudo gem uninstall rails -v 3.0.0.beta3, it uninstalls rails but leaves the beta3 versions of activerecord, actionmailer, etc. How do I completely uninstall rails 3.0.0.beta3 and all its dependencies automatically? I would like a clean slate for the RC and final releases.
...
I've seen reports that Facebooker doesn't work with Rails 3. I've noticed that there's a Facebooker2 project, but it doesn't seem to have any documentation and there's no information I can find about its Rails 3 compatibility. Are there any good choices for getting Facebook Connect working with a website built on Rails 3.0.0 (beta4)?
...
I'm on Ubuntu 10.04 x64, ruby version 1.8.7 (2010-01-10 patchlevel 249)
I've read this thread first: http://stackoverflow.com/questions/1332207/uninitialized-constant-mysqlcompatmysqlres-using-mms2r-gem and tried everything that people suggested:
apt-get install libmysqlclient-dev
export ARCHFLAGS="-arch x86_64"; sudo gem install --no...
Hi,
I'm trying to rename the authlogic error messages in a Rails 3 app.
The general format I found out working in Rails 3:
de:
errors:
template:
header:
one: "Konnte {{model}} nicht speichern: ein Fehler."
other: "Konnte {{model}} nicht speichern: {{count}} Fehler."
body: "Bitte überprüfen Sie die...
I just installed Rails 3 and created my first app. The install of Rails3 + ruby 1.9 went very smoothly but I am missing the generate script in script/generate.
I have created a new app from scratch with no options to verify.
Any idea why this is happening and how to fix it?
...
What's the best way to test scopes in Rails 3. In rails 2, I would do something like:
Rspec:
it 'should have a top_level scope' do
Category.top_level.proxy_options.should == {:conditions => {:parent_id => nil}}
end
This fails in rails 3 with a "undefined method `proxy_options' for []:ActiveRecord::Relation" error.
How are peopl...
I want to create a Rails 3 route with entirely optional parameters. The example broken route is:
match '(/name/:name)(/height/:height)(/weight/:weight)' => 'people#index'
Which results in 'rake:routes' yielding:
/(/name/:name)(/height/:height)(/weight/:weight)
And thus adding an initial slash to all links:
<a href="//name/kevi...
I have installed ambethia's captcha plugin as a plugin in my rails 3 app. When I put the <%= recaptcha_tags %> in my view, it prints this on the page:
<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=my_key&error=expression"></script> <noscript> <iframe src="http://api.recaptcha.net/noscript?k=my_ot...
After upgrading to Rails 3, fixtures that refer to other labelled fixtures (for relationships) stop working. Instead of finding the actual fixture with that name, the fixture label is interpreted as a string.
Example:
# Dog.yml
sparky:
name: Sparky
owner: john
# Person.yml
john:
name: John
Where Dog "belongs to" person.
The...
Hi,
I have started with Ruby and Rails development and I am a Java developer from the last 2 years (student). I am in for two things:
Learn Ruby
Make my website on ROR
I have Agile Web Development with Rails, 2nd Edition.
So, here are my questions:
How is the Agile Web Development with Rails book to start with, where I don't know...
After Installing Rails 3, I get the following error regarding Sqlite3 when I try to do a migrate:
dlsym(0x1037e5f10,
Init_sqlite3_native): symbol not found
- /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.0/lib/sqlite3/sqlite3_native.bundle
I am using Snow Leopard, if that makes a difference.
...
Dears,
how can i trigger a prompt (or flash message with links) display (notifying) for one of the logged in agent (specific agent screen) on my web application when receiving a request from a client.
using rails and jquery.
as my application is serving a call center, and the my client request ... when a call coming to the system a pro...
So here's the scenario:
User:
has_one :company
accepts_nested_attributes_for :company
Controller:
@user = User.new
@user.build_company
View:
<% semantic_form_for @user, :url => register_path do |form| %>
<h2>User Information</h2>
<%= form.inputs %>
<h2>Company Information</h2>
<% form.semantic_fields_for :company do ...
Given the following models:
class Recipe < ActiveRecord::Base
has_many :recipe_ingredients
has_many :ingredients, :through => :recipe_ingredients
end
class RecipeIngredient < ActiveRecord::Base
belongs_to :recipe
belongs_to :ingredient
end
class Ingredient < ActiveRecord::Base
end
How can I perform the following SQL query us...
I'm trying to do a manual jQuery AJAX request the following way:
$("#user_plan_id").change(function() {
$("#plan_container").load('/plans/' + this.value);
});
I have the "rails.js" file included in my header, and a "<%= csrf_meta_tag %>".
I see from my log that the request IS getting to the server (although without the authentici...
In Rails 2 we can add custom new actions to resourceful routes, like:
map.resources :users, :new => {:apply => :get}
How do we achieve the same thing in Rails 3?
resources :users do
get :apply, :on => :new # does not work
new do
get :apply # also does not work
end
end
Any ideas?
...
Does anyone know how the authenticity token is managed in rails 3? With all the unobtrusive javascript rails 3 articles showing how the html5 data attributes are used I don't see the authenticity token anywhere.
...
I keep getting an error from the ActiveModel:EachValidator module when I try to use it as follows:
class AnswerValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
record.errors[attribute] << (options[:message] || "question not answered") if value.nil? and !record.errors[attribute].include?(options[:m...
I'm working a Rails 3 controller that has a very specific, limited purpose, and all I need is for it to respond_to :json.
This screencast says my controller can inherit from ActionController::Metal, and then just include the functionality I need to make things faster:
http://rubyonrails.org/screencasts/rails3/action-controller
When my...
I'm writing an app where several of the routes should only be accessible from localhost. It looks like this is possible with the new routing system.
http://www.railsdispatch.com/posts/rails-3-makes-life-better
This has examples of restricting routes based on IP address, and setting up an IP address blacklist for your routes, but I'm in...