like your railscasts, but I always have problems with the playback of the video files. Neither vlc/windows nor vlc/linux can play back the files without scrambling half of it.
Encoding issues? Any advice?
VERY useful, once agin. The only thing I found "unnecessary" was to the carry the input field. If you're gonna do it in AJAX, this field isn't gonna be impacted by the "submit". That is, however, a good tip for when you're *not* doing it over Ajax.
@JohnDel: RJS was yesterday. Nowadays we do unobstrusive JS. Have you ever tried to debug a RJS produced JS? :) I did, and then I started learning JS.
it seems funny, but I would start doing a search (with rails 3.0) and thought - "I'll take a look at Ryan's website." you're always one step ahead. When I grow up I want to be like you =D
While I've seen all of your episodes Ryan (and I must say that the time you put into this is great for all lazy bums that don't have that much time to experiment with all the new stuff in the Rails world), I am a bit surprised to find more and more spam in your comments.
If you don't want to moderate them, why not at least let people who want to comment login using something like OmniAuth?!
I've also got the OAuth::Unauthorized problem when trying to add Twitter at /auth/twitter.
My Twitter app is set up as a Browser app and my callback url is: 127.0.0.1/auth/twitter/callback
Does anybody have any idea how to fix this?
During my research I also found that Device is doing some kind of Omniauth integration in 1.2 with device :omniauthable. What approach is the prefered do you think?
I'm trying to get this working with Rails 3, but whenever I try and crop an image, I get a "Completed 406 Not Acceptable" from my webrick log. It seems to be completing the page load just fine, but the page itself is totally blank, with no HTML at all be rendered. Does anyone know how to fix this?
I am to a great extent impressed with the article I have just read interesting very good.I read the Blog Nice site I found and I bookmarked the site… Plan on coming back later to spend a little time there.
(sorry for my english)
Very nice.. thanks for coding xD..
But i have a problem
I'm implement this with mongodb using mongoid .. works fine except for when the signup process is successfull the call for find_by_provider_and_uid in uthentications_controller.rb:8:in `create' raise a error: undefined method..
However I can't make 'tokens' work while using Rails 2.3.8 with recent plugin. Neither original nor param_name variation worked for me. I wonder if recent version of this plugin still supports tokens.
Nice tutorial, great for quick PDF's, I would still use Prawn for some of the letters I produce.
Will use this way of creating PDF's on the fly, a PDF icon/link in the application layout will allow any page (current) to be saved which is a neat feature.
Great tutorial! But I'm using this to search for a virtual attribute. I get an error saying that theres no such column in my db table (cause its virtual..). Can this method not be used for searching virtual attributes?
@James Edward Gray II - Thanks that worked for me. I had my files stored inside ~/Documents which was not allowed to anyone. After chmoding it to 711, all good.
Em0ral & Gareth: it's actually easier than that. If you signup using email & password and then logout, you won't be able to signup using facebook or twitter because the email will be already stored in the database.
On possible fix could be searching for the email using the omniauth data from the service (google apps, facebook, etc) and, if it's in the DB, load the user, create a new authentication for him and then do a sign_in_and_redirect.
Sadly this doesn't work for twitter since you can't get the email address from the API.
Ha...looks like Gareth covered my question...my only thought was to not send them to authentications page...but that would suck if user needed to change providers for one reason or another...wouldn't want them to loose existing credentials. Guess you could make the pop up msg warn user that account will be deleted.
First let me say I don't know how I would survive without your Railscasts. Moving from infrastructure to development and it has shortened my learning curve.
Question - I've noticed that after a new user authenticates and a record is created if a user deletes all registered services from the authentications page, logout and deletes their cache/cookies you are left with orphaned records. If that user tries to login once more with same credentials the email will be already registered in the database.
Am I correct on this or should I grab some popcorn sit down and kick of the cast again?
"By default all jobs are scheduled with priority = 0, which is top priority. You can change this by setting Delayed::Worker.default_priority to something else. Lower numbers have higher priority."
This seems to contradict what was stated about priority in the screencast. If lower numbers have higher priority, then shouldn't negative numbers trump 0?
Awesome! Just last week I stumbled upon the new methods, and got stuck trying to figure out what was happening. The subtitle should be "Unrolling rails spaghetti".
This cast actually made me take a deeper look into the Rails source code. I am still stunned about the sweetness of the code. It's so much more enlightening than I thought it would be. Keep up casting!
@Dave Porter: sorry, my mistake; I think I missed the "download" part in your message (I certainly should change my eyes, or stop to only read one word out of two :-)
When I read your comment (and before posting mine), I tried to watch the aforementioned videos (only the .mov versions), both live with VLC and QT and after downloading them.
I only got problems when watching them live with VLC (for both episode: the video starts reading, then halts after a few seconds, then restarts reading and so on) and with the 14th's video when watching it live with QT: it quickly loads the first 2 minutes, then hangs for a while, then continues to download the video upto the end with no pause; if the pause at 2min was not too long, the reader does not have the time to catch up the download pause, and the video reads fine.
I got no download problems with curl, and the videos read fine with both VLC and QT.
That's why I made the supposition you were reading them live with VLC.
My guess is you're using VLC to watch the videos thanks to the "Open Network..." option, aren't you?
DON'T DO THAT: VLC has trouble to correctly download the Railscasts and play them live :-(
Instead, pre-download the video (using curl, wget...) and save it somewhere, then open the file with VLC: it will work fine (no need to wait for the download to finish: once a few percent —depending on your link speed— is saved, you can start watching it with VLC.)
Or use another player (QT Player on Mac works fine for me.)
Just letting you know I've tried downloading episodes 14 and 16 and they start but hand part way through.
I tried 16's m4v and it downloads fine!
cheers Dave
Hey Ryan I think it's time for a bit of a <video> tag here :) That would allow to watch the video while having the shownotes as a reference. Check out http://pomcast.com for example to see how it looks :)
I want to put the i18n variables into global.inc, but only apply them if i18n is enabled. I've put the following code into global.inc: if (module_exists('i18n'))
I m glad i found ur blog.Not everyone can provide information with proper flow. Good post. I am going to save the URL and will definitely visit again. Keep it up. thank you!
Hi Ryan,
like your railscasts, but I always have problems with the playback of the video files. Neither vlc/windows nor vlc/linux can play back the files without scrambling half of it.
Encoding issues? Any advice?
Anyway, thanks for great rails resource!
To save the server some work, you can do searching without ajax. Just do a simple jQuery search in the already loaded list.
Then you do not send a sql query everytime you have a keyup.
This works great on smaller lists
MetaWhere+MetaSearch is also a good alternative for Simple Search Form.
MetaWhere is also a good alternative for Simple Search Form.
VERY useful, once agin. The only thing I found "unnecessary" was to the carry the input field. If you're gonna do it in AJAX, this field isn't gonna be impacted by the "submit". That is, however, a good tip for when you're *not* doing it over Ajax.
@JohnDel: RJS was yesterday. Nowadays we do unobstrusive JS. Have you ever tried to debug a RJS produced JS? :) I did, and then I started learning JS.
Nice tutorial and nice getScript way of converting a link to ajax.
But why you chose ajax calls with jquery instead of rjs and remote? Are there any benefits?
it seems funny, but I would start doing a search (with rails 3.0) and thought - "I'll take a look at Ryan's website." you're always one step ahead. When I grow up I want to be like you =D
Thank you for your attention on this topic. It was very helpfull. Good work.
msdark, does mongoid provide that method?
http://mongoid.org/docs/querying/
That's a very interesting approach. It sheds some new light on the topic. Got to visit this blog more often
While I've seen all of your episodes Ryan (and I must say that the time you put into this is great for all lazy bums that don't have that much time to experiment with all the new stuff in the Rails world), I am a bit surprised to find more and more spam in your comments.
If you don't want to moderate them, why not at least let people who want to comment login using something like OmniAuth?!
Thanks. U are the best. I like this text. Hello from Russia =)
I've also got the OAuth::Unauthorized problem when trying to add Twitter at /auth/twitter.
My Twitter app is set up as a Browser app and my callback url is: 127.0.0.1/auth/twitter/callback
Does anybody have any idea how to fix this?
During my research I also found that Device is doing some kind of Omniauth integration in 1.2 with device :omniauthable. What approach is the prefered do you think?
Thanks in advance!
I'm trying to get this working with Rails 3, but whenever I try and crop an image, I get a "Completed 406 Not Acceptable" from my webrick log. It seems to be completing the page load just fine, but the page itself is totally blank, with no HTML at all be rendered. Does anyone know how to fix this?
I am to a great extent impressed with the article I have just read interesting very good.I read the Blog Nice site I found and I bookmarked the site… Plan on coming back later to spend a little time there.
Thanks Eric Baker for comments no. 38 and 39. Saved my day..
(sorry for my english)
Very nice.. thanks for coding xD..
But i have a problem
I'm implement this with mongodb using mongoid .. works fine except for when the signup process is successfull the call for find_by_provider_and_uid in uthentications_controller.rb:8:in `create' raise a error: undefined method..
Some idea to fix?
What are the advantages of simple_form vs formtastic ??
Great info, helped me a lot.
However I can't make 'tokens' work while using Rails 2.3.8 with recent plugin. Neither original nor param_name variation worked for me. I wonder if recent version of this plugin still supports tokens.
Nice tutorial, great for quick PDF's, I would still use Prawn for some of the letters I produce.
Will use this way of creating PDF's on the fly, a PDF icon/link in the application layout will allow any page (current) to be saved which is a neat feature.
Good Job!
<div id="forums">
<% for forum in @forums %>
<div class="forum">
<h2><%= link_to h(forum.name), forum %></h2>
<p><%=h forum.description "%></p>
<p class="admin" style="display:none">
<%= link_to "Edit", edit_forum_path(forum) %> |
<%= link_to "Destroy", forum, :confirm => 'Are you sure?', :method => :delete %>
</p>
</div>
<% end %>
</div>"
I guess the quest for me is why would they ever need access to the /authentications page
Great tutorial! But I'm using this to search for a virtual attribute. I get an error saying that theres no such column in my db table (cause its virtual..). Can this method not be used for searching virtual attributes?
@ Anders Heie - Thanks so much for the Rails3 tip! I've been pulling my hair out for half an hour on that cropper.rb change!
@James Edward Gray II - Thanks that worked for me. I had my files stored inside ~/Documents which was not allowed to anyone. After chmoding it to 711, all good.
Em0ral & Gareth: it's actually easier than that. If you signup using email & password and then logout, you won't be able to signup using facebook or twitter because the email will be already stored in the database.
On possible fix could be searching for the email using the omniauth data from the service (google apps, facebook, etc) and, if it's in the DB, load the user, create a new authentication for him and then do a sign_in_and_redirect.
Sadly this doesn't work for twitter since you can't get the email address from the API.
Getting
OAuth::Unauthorized
401 Unauthorized
and Twitter doesn't allow you to set http://localhost:3000/auth/twitter/callback as the callback URL for development?
Instead of localhost use 127.0.0.1
Ha...looks like Gareth covered my question...my only thought was to not send them to authentications page...but that would suck if user needed to change providers for one reason or another...wouldn't want them to loose existing credentials. Guess you could make the pop up msg warn user that account will be deleted.
First let me say I don't know how I would survive without your Railscasts. Moving from infrastructure to development and it has shortened my learning curve.
Question - I've noticed that after a new user authenticates and a record is created if a user deletes all registered services from the authentications page, logout and deletes their cache/cookies you are left with orphaned records. If that user tries to login once more with same credentials the email will be already registered in the database.
Am I correct on this or should I grab some popcorn sit down and kick of the cast again?
Thanks
From the collectiveidea docs, I'm seeing this:
"By default all jobs are scheduled with priority = 0, which is top priority. You can change this by setting Delayed::Worker.default_priority to something else. Lower numbers have higher priority."
This seems to contradict what was stated about priority in the screencast. If lower numbers have higher priority, then shouldn't negative numbers trump 0?
Ryan, the idea of exploring code behind is awesome!
Thank you very much for you great screencats!
Just as reference, here is the official API Doc:
http://api.rubyonrails.org/classes/ActiveRecord/Base.html#method-c-with_scope
Awesome! Just last week I stumbled upon the new methods, and got stuck trying to figure out what was happening. The subtitle should be "Unrolling rails spaghetti".
Really wonderful, esp. the open-ended part at the end where you point out methods that are worthy of further study.
Excellent. As usual.
This cast actually made me take a deeper look into the Rails source code. I am still stunned about the sweetness of the code. It's so much more enlightening than I thought it would be. Keep up casting!
@Dave Porter: sorry, my mistake; I think I missed the "download" part in your message (I certainly should change my eyes, or stop to only read one word out of two :-)
When I read your comment (and before posting mine), I tried to watch the aforementioned videos (only the .mov versions), both live with VLC and QT and after downloading them.
I only got problems when watching them live with VLC (for both episode: the video starts reading, then halts after a few seconds, then restarts reading and so on) and with the 14th's video when watching it live with QT: it quickly loads the first 2 minutes, then hangs for a while, then continues to download the video upto the end with no pause; if the pause at 2min was not too long, the reader does not have the time to catch up the download pause, and the video reads fine.
I got no download problems with curl, and the videos read fine with both VLC and QT.
That's why I made the supposition you were reading them live with VLC.
And just re-read my first post - the obvious typo should read 'hang' not 'hand' :)
@Frederic - thanks but no I am not watching them live (I did say I was downloading them & the issue was just with these earlier episodes!)
cheers Dave
@Dave Porter:
My guess is you're using VLC to watch the videos thanks to the "Open Network..." option, aren't you?
DON'T DO THAT: VLC has trouble to correctly download the Railscasts and play them live :-(
Instead, pre-download the video (using curl, wget...) and save it somewhere, then open the file with VLC: it will work fine (no need to wait for the download to finish: once a few percent —depending on your link speed— is saved, you can start watching it with VLC.)
Or use another player (QT Player on Mac works fine for me.)
Great Cast! Video flickers here in the beginning... Same with the previous episode.
Thanks for this Mondays sweetness :)
Just letting you know I've tried downloading episodes 14 and 16 and they start but hand part way through.
I tried 16's m4v and it downloads fine!
cheers Dave
Hey Ryan I think it's time for a bit of a <video> tag here :) That would allow to watch the video while having the shownotes as a reference. Check out http://pomcast.com for example to see how it looks :)
It work great .
but It's seems not support chinese in Ubuntu server 10.04 LTS.
any one help?
wow! rails's source code agian!
I've watched pretty much every single show you've done and this is probably the best one yet.
Thanks
undefined local variable or method `sort_column' for #<#<Class:0x236d5e8>:0x236b920>
for the line:
<th><%= sortable "reference", "Reference" %></th>
What now? (rails 3.0)
I copied/pasted your code in my controller, nothing more, nothing less.
When i comment all the helper code after:
title ||= column.titleize
The page displays correctly (just without sorting)
Any help is welcome.
I want to put the i18n variables into global.inc, but only apply them if i18n is enabled. I've put the following code into global.inc: if (module_exists('i18n'))
I m glad i found ur blog.Not everyone can provide information with proper flow. Good post. I am going to save the URL and will definitely visit again. Keep it up. thank you!
Great article, hey I stumbled on to this post