Please read for an updated status on RailsCasts:
Learn more or hide this
GitHub User: Metallord
Nice gravedigging ;)
As of Rails 3.2 plugins are deprecated. Also this is a very old episode and restful_authentication itself hasn't been updated for more than a year.
Consider following some newer episodes on authentication. You could try asking Ryan for a revisit, but I doubt it'd be high on his list.
You should set an environment variable called FACEBOOK_APP_ID containing your actual id. If you're working on a unix type system you can do that with the export command, but that will set it just for the current session. You can also set the variable right before the rails command: FACEBOOK_APP_ID="your app id" rails s. If you want it to persist you should append the export call to your .bashrc file (or .zshrc or the rc file of your terminal). export FACEBOOK_APP_ID="your app id".
FACEBOOK_APP_ID="your app id" rails s
export FACEBOOK_APP_ID="your app id"
This is not an issue specifically with this episode's code. You upgraded from 3.0 to 3.2. Rails already told you what you need to do. Two things:
You did not specify how you would like Rails to report deprecation notices for your development environment, please set config.active_support.deprecation to :log at config/environments/development.rb
You need to remove the debug_rjs config option from your environment files as it was deprecated in 3.1 and removed in 3.2.
Hope this helps.
Setting :public => !user_signed_in? won't work, because when the first user comes, she won't be signed in and so the cache will be set, and when it gets set it won't hit the app to check it again.
:public => !user_signed_in?
I imagine you would have to override some behaviour in the rack::cache itself or put another middleware before it. But I don't think it would be worth it.
You should try the solution form epsiode #169 mentioned above. If you really want to get dirty with middlewares you can try to mix it with episode #205 on authentication with Warden, but as I said I doubt it's worth the effort. You'll just get into a mess that way.
I had the same issue. Facebook just doesn't seem to work with localhost unlike Twitter. But I did test it against a public ip that I own and it works as expected. If you don't have a pulbic ip you can try going with some kind of dynamic dns solution.
You can also try looking up this Stackoverflow topic, but your settings seem correct. Maybe lvh.me will work though.
Revised Railscasts are one of the best things ever. A nice idea taken from the Mythbusters ;]
Thanks for another great episode!
EDIT: It should also be under the Rails 3.1 tag since you were using coffeescript.
Thank you very much for another great screencast! I agree that doing complex testing in each episode would be an overkill, but an episode dedicated to testing only from time to time is a really great idea and will encourage not-so-experienced developers like myself that testing really is the way to go.
Also you could at some point return to the idea of walkthrough screencasts like the ones you did around the release of 3.0. I personally also considered them a great help and they made me a better coder.
Thank you very much again and keep up the amazing work!
@Alexander I'm having the same problem with virtually every rails app. For me it seems to be an issue with my system. Putting gem 'racc' in the Gemfile makes it work for me.