Questions tagged [railscasts]

Short Ruby on Rails screencasts containing tips, tricks and tutorials.

Every week Ryan Bates will host a new Railscasts episode featuring tips and tricks with Ruby on Rails. These screencasts are short and focus on one technique so you can quickly move on to applying it to your own project. The topics target the intermediate Rails developer, but beginners and experts will get something out of it as well.

http://railscasts.com/

275 questions
66
votes
18 answers

OmniAuth & Facebook: certificate verify failed

I've followed Railscast #235 to try and set up a minimal Facebook authentication. I've first set up a Twitter authentication, as done by Ryan himself. That worked flawlessly. I then moved on to adding a Facebook login. However, after authorizing the…
shmichael
  • 2,985
  • 3
  • 25
  • 32
53
votes
3 answers

Setting Environment Variables in Rails 3 (Devise + Omniauth)

I've been trying to figure out how Ryan Bates, in his Facebook Authentication screencast, is setting the following "FACEBOOK_APP_ID" and "FACEBOOK_SECRET" environment variables. provider :facebook, ENV['FACEBOOK_APP_ID'],…
36
votes
5 answers

carrierwave - rails 3.1- undefined method: image_will_change

I get an error that look like this: undefined method `post_image_will_change!' for # app/controllers/posts_controller.rb:43:in `new' app/controllers/posts_controller.rb:43:in `create' I've included this in my "post" model: …
buren
  • 742
  • 1
  • 8
  • 14
13
votes
5 answers

How to use Elasticsearch on Heroku

I've just finished watching both Railscasts' episodes on Elasticsearch. I've also went ahead and implemented it into my rails application (3.1) and everything is working great. How I want to deploy my app to Heroku but I'm unsure how to get…
Kyle Decot
  • 20,715
  • 39
  • 142
  • 263
10
votes
2 answers

ruby include vs extend

I am trying to abstract some of the logic required for cropping images into a module so that its not messing up my models. The code is based on http://railscasts.com/episodes/182-cropping-images module CroppableImage def…
Nick
  • 2,715
  • 4
  • 24
  • 35
10
votes
4 answers

Rails, OpenID and Authlogic

I've been following ryan baytes screencast #170 and adding ruby-openid, authlogic and authlogic-oid to an existing authlogic authentication system. However, I keep getting the following stack of errors: NameError (uninitialized constant…
cnikolaou
  • 3,782
  • 4
  • 25
  • 32
10
votes
2 answers

Adding dynamic fields to nested form through AJAX

I've been watching and reproducing these railscasts on my app: 196-nested-model-form-part-1 and 197-nested-model-form-part-2. I do not yet have a pro account so i can't watch the revised episode. I'm developing under rails4 (edge) and…
Crystark
  • 3,693
  • 5
  • 40
  • 61
8
votes
1 answer

ActiveSupport::TimeZone list of strings for offset

I've followed Ryan Bate's railscast #106 http://railscasts.com/episodes/106-time-zones-revised which adds a time_zone string to the User model. The string is from the dropdown: = f.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones I am…
Shauno
  • 1,238
  • 1
  • 11
  • 18
8
votes
1 answer

Rails & Redcarpet: uninitialized constant Redcarpet::Render when used in ApplicationHelper

I'm following along the RailsCasts episode for Syntax Highlighting Revised. I updated my ApplicationHelper to look like so: require 'redcarpet' module ApplicationHelper class HTMLwithPygments < Redcarpet::Render::HTML def block_code(code,…
sunnyrjuneja
  • 6,033
  • 2
  • 32
  • 51
8
votes
1 answer

Receive Name error while trying to call wicked wizard steps

I try to reproduce http://railscasts.com/episodes/346-wizard-forms-with-wicked railscast. I try to create report in four steps wizard. I generate controller report_steps add resources :report_steps to routes.rb create steps views Now I try to…
Alex Teut
  • 844
  • 9
  • 20
8
votes
4 answers

DangerousAttributeError in OmniAuth Railscast Tutorial: create is defined by ActiveRecord

I've looked at ActiveRecord::DangerousAttributeError and other similar threads on SO, but they don't address the same issue. I'm following the omniauth tutorial: http://railscasts.com/episodes/235-omniauth-part-1?view=asciicast I'm able to…
xta
  • 729
  • 2
  • 8
  • 29
7
votes
1 answer

webrat_steps.rb missing

I'm trying to work through http://railscasts.com/episodes/155-beginning-with-cucumber which basically teaches how to use Cucumber within Rails applications. I installed all missing gems and running rails g cucumber:install runs though without…
pagid
  • 13,559
  • 11
  • 78
  • 104
7
votes
1 answer

Multi-step form in Rails 3 with Paperclip attachments

I'm creating a multi-part form in the style that Ryan Bates describes here: http://railscasts.com/episodes/217-multistep-forms http://asciicasts.com/episodes/217-multistep-forms (text-based version) To summarize, I have one view (with a bunch of…
Jeremy White
  • 2,818
  • 6
  • 38
  • 74
7
votes
2 answers

Rails 3 Edit Multiple Records in a Single Form

I've been stuck on this problem for a couple of days now. I've have some success with Railscasts Episode #198, but that one is for Rails 2. There have been some changes in Rails 3 that make it so the code provided in Episode #198 won't work. The…
chris__allen
  • 439
  • 1
  • 6
  • 14
7
votes
3 answers

Generating dynamic child rows in Rails partial

I have implemented a nested attribute form using the nested attributes Railscast as a guide. As a result, the user can click an icon to dynamically add "child" rows to my view. Unfortunately, I can only make this work for the last icon in my view…
1
2 3
18 19