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
2
votes
2 answers

multiple image uploads in a nested form with carrierwave

I'm following railscasts episode 381 in an attempt to allow multiple image uploads to my app with the carrierwave gem & jQuery File upload. My app is for a college project & is set up with a hikingtrails model which has many & accepts nested…
Holly
  • 7,462
  • 23
  • 86
  • 140
2
votes
3 answers

Add Edit and Delete feature in comment polymorphic-association-revised posts

I read this http://railscasts.com/episodes/154-polymorphic-association-revised posts and implement it as it have. But i want to add edit and delete features also in this tuotorial. I have comments_controller.rb is like this class CommentsController…
2
votes
2 answers

"BUG segmentation fault" while working with private_pub gem

I was trying the code from this screencast http://railscasts.com/episodes/316-private-pub. I grabbed the code from github. However, whenever, I try to send a message from that app, the faye server shuts down giving following…
Jatin
  • 14,112
  • 16
  • 49
  • 78
2
votes
2 answers

unable to run faye server while using private_pub gem

I tried following along with this screencast http://railscasts.com/episodes/316-private-pub which implements basic realtime functionality using private_pub gem. I used rackup private_pub.ru -s thin -E production to start the faye server (thin…
2
votes
1 answer

Generate reset password token don't save on model

Hello I trying to create a reset password for my rails app; but when I try to save I get the following error: Validation failed: Password can't be blank, Password is too short (minimum is 6 characters), Password confirmation can't be blank This…
Jean
  • 5,201
  • 11
  • 51
  • 87
2
votes
1 answer

rails cancan custom actions

I'm trying to prevent editors of various items from being able to publish their own works using cancan but it doesn't work as expected. Everything else so far works perfectly. For example: can :publish, [Article, Review] do |doc| doc.user !=…
holden
  • 13,471
  • 22
  • 98
  • 160
2
votes
1 answer

can't show an Image in my _form view in a nested model edit page

I'm using Carrierwave to add an image field to a Rails nested model based on Ryan Bates revised #196 screencast. The Carrierwave bit is based on his screencast #253 The Question and Answer models are nested in a Categories model. I can get the image…
charliemagee
  • 683
  • 5
  • 19
2
votes
1 answer

'Warning: Non-executables were installed to "bin" ' when installing elasticsearch via homebrew

I'm following this railscast to get elasticsearch going in my rails app. When I install it using homebrew like the railscast shows, I get this warning Warning: Non-executables were installed to "bin". Installing non-executables to "bin" is bad…
Steve
  • 4,446
  • 7
  • 35
  • 50
1
vote
3 answers

Why does the rails 3 application.js file state that it's not advisable to add code there?

In rails 3 the application.js file was moved to assets>javascripts>application.js In this file there are pre-loaded comments that state: Add new JavaScript/Coffee code in separate files in this directory and they'll automatically be included in the…
Steve
  • 4,446
  • 7
  • 35
  • 50
1
vote
0 answers

Getting document.observe is not a function when implementing endless page from Railscast 114

Rails and programming beginner here. I'm trying to implement endless page from Railscast 114 but it isn't loading. Firebug console brings up an error: document.observe is not a function - document.observe('dom:loaded', checkScroll); Have tried…
toandang
  • 109
  • 1
  • 3
  • 11
1
vote
1 answer

Rails 3.1 authentication over json failing

I've been through railscast 270 and implemented a basic sign up form for users (in this app called players). The forms work fine, but when I try and authenticate over json, I get errors. Any ideas on how to fix this? POST request to…
Jack
  • 3,878
  • 15
  • 42
  • 72
1
vote
2 answers

rails server not starting - trying to run code from ryan bates railscasts application with rails 3

I am trying to work with ryan bates' sample code that he uses for his railscast on Daemon (episode 129). I have rails 3 installed, and when I downloaded his code, I cannot run the server. To try and fix this, I copied my gemfile and gemfile.lock…
user924088
  • 107
  • 1
  • 10
1
vote
1 answer

rails virtual attributes won't read from form_for submission

I am trying to implement a rails tagging model as outlined in Ryan Bate's railscast #167. http://railscasts.com/episodes/167-more-on-virtual-attributes This is a great system to use. However, I cannot get the form to submit the tag_names to the…
jay
  • 12,066
  • 16
  • 64
  • 103
1
vote
0 answers

Passing javascript through a function, html_safe, raw and f not working

I was following Railscasts 196 and 197 in order to better learn dynamic nested model forms and I can across this problem. I am not sure how to pass javascript through the link_to_function, the class of a field contains a jquery timepicker. def…
Seanland
  • 136
  • 6
1
vote
3 answers

Railscast 143 (Paypal security) resulting in "We were unable to decrypt the certificate id."

Doing railscast #143. Code is below. When I add the security stuff, I get "We were unable to decrypt the certificate id." in development. When I take the security stuff out, it works peachy again. I've redone the whole process a couple times with…
icewoman27
  • 33
  • 9