Top "Ruby-on-rails-3" questions

Ruby on Rails is an open-source web development framework written in Ruby.

Rails - Could not find a JavaScript runtime?

I created a new Rails project using rails 3.1.0.rc4 on my local machine but when I try to start the …

javascript ruby-on-rails ruby-on-rails-3 node.js ruby-on-rails-3.1
How to run `rails generate scaffold` when the model already exists?

I'm new to Rails so my current project is in a weird state. One of the first things I generated …

ruby-on-rails ruby-on-rails-3
ActiveRecord find and only return selected columns

edit 2 If you stumble across this, check both answers as I'd now use pluck for this I have a fairly …

ruby-on-rails ruby-on-rails-3 rails-activerecord
ActiveRecord OR query

How do you do an OR query in Rails 3 ActiveRecord. All the examples I find just have AND queries. Edit: …

ruby-on-rails ruby-on-rails-3 rails-activerecord
Best way to load module/class from lib folder in Rails 3?

Since the latest Rails 3 release is not auto-loading modules and classes from lib anymore, what would be the best way …

ruby-on-rails class module autoload ruby-on-rails-3
Best way to pretty print a hash

I have a large hash with nested arrays and hashes. I would like to simply print it out so it …

ruby ruby-on-rails-3
Rails 3.1 and Image Assets

I have put all my images for my admin theme in the assets folder within a folder called admin. Then …

ruby-on-rails ruby-on-rails-3
How to restart a rails server on Heroku?

Locally I just interrupt (ctrl-c) and then start it again. How do I do the same thing with an app …

ruby-on-rails ruby-on-rails-3 heroku
Add a CSS class to <%= f.submit %>

My question is easy: <%= f.submit %> Where does the class declaration go? I'm getting errors on multiple attempts.

ruby-on-rails css ruby-on-rails-3
How can I specify a local gem in my Gemfile?

I'd like Bundler to load a local gem. Is there an option for that? Or do I have to move …

ruby-on-rails ruby ruby-on-rails-3 rubygems bundler