RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: rbritom
Akshay Rawat 's post that refers to a video where all of my worries are presented along the reasons why I havent done much more than design and prototypes apps with document based DB and never in production.
Well i have had the same problems she is talking about at the design face, i have never implemented document base db because of all she said. Still i think things are changing because most node.s projects use mongodb and node.js's community is growing very fast.
Thanks Ryan great episode as always.
What i find a bit hard to implement in document base DB are trees and has_many through associations.
evented is not the same as threaded they have differente uses. Evented uses less resources too.
I have issues trying to test blocking input into a text field. I made a jQuery plugin that forbids inputing number, spaces, or chars, but since triggering keypress, keyup or keydown dont actually print the value into the text field (it trigger the event but does not puts a value there) i have no way of making the correct expectation (not even with the sendkeys plugin).
Anyone knows how to test this kind of things?
Can anyone tell me how this kind of frameworks handle file uploads, since ajax upload is not standardized?
Well meteor looks as magical as Rails did the first time i saw Rails, I mean , where is the db connection set? I know everything is work via CoC but wow that is one slim app.
I believe that is even if meteor or similar clients side technologies don't replace Rails eventually there is a very high possibility they could replace sinatra apps since I use sinatra for very similar applications and meteor does seems to be a quicker/slimmer/awesomer solution.
on Unix/Linux based systems remember that environment variables almost always refers to the operating systems is user/session/machine variables, not application configuration files.
I would like to note that if you want use image_tag in a mailer you have to set
config.action_mailer.asset_host = 'www.yourhost.com'
so that image_tags have the right source in the email
it will turn this
# all images are broken
<img src="/images/icon.png" alt="Icon" />
# all images are fine
<img src="www.yourhost.com/images/icon.png" alt="Icon" />
since config.action_mailer.default_url_options has no effect on image_tag
Excellent. Ryan, i have notice you havent touched integrating rails with social networks, any hopes for seen that in a future episode?
What a great episode. Thnx Ryan.
I am a bit disappointed that most cookbooks ignore Mac OS X server. :(
Since you are already overwriting stuff you could try this in an initializer
class << self
def fallbacks(locale = self.locale)
when :en then [:de, :wk]
when :wk then [:de, :en]
when :de then [:wk, :en]
Non tested and found at stackoverflow but seems like it could work. Checkout the thread to see more details
and project started!!!!
The one ryan mentioned
Joe please post here if the bug Ryan mentioned has been fixed, im about to try Refinary , im just waiting for that fix.
*starts eating pop corn*
i was looking into several rails cms a about a year or so ago and none had good documentation. I just checked the new Refinary docs and they are much better than what i remember.
I tried Refinary a long time ago but there is no good documentation, it must have taken you quite some time digging through the source code to figure all this out ryan
I'm confuse, is this like compass?
verify that you can access the category_id column via mass assignment.
Add category_id to the attr_accessible declaration in your model
does this works well along a mulit user rvm installation? will it correctly load my rails environment based on the .rvmrc file?
wow , i didnt know about dom_id, you know how many places have used interpolation instead?... :(
=D good thing i learned this , thanks Ryan.
There used to be a gem that put this into the DB and had an interface , why has everyone move way from that? is there something wrong with that approach?
Ill use it in my next project which starts tomorrow. Thanks for sharing.
I was using VCR and come into a particular problem, i do no communicate to the web service directly i first establish a reverse ssh tunnel to another computer in the network, so i could not figure a way to capture the request. Any suggestions?
Oh, one other thing, it is also posible and very easy to read the values with nokogiri using a css selector.
doc = Nokogiri::XML(response.to_xml)
zipcode = doc.css("USzip").inner_text
I find it most useful when dealing with collections
doc.css('ProductCode').each do |product|
there are 3 types of errors, one from the SOAP service it self, one from savon and one from the communications gem ( timeout error or no response) for the first one the web service should be able to notify of the error somehow (return a status tag) so you can handle that without the need of a begin rescue block the other cases are handled with with beging rescue.
Awesome as alway.
Ryan i will take this opportunity to motivate a topic that i think you have work with and i did have to solve when dealing with savon. The web service i comunicate with takes a couple of second to respond ( the rails app waits and does not answer to user request), so i took an approach i saw you using in episode 243, i used beanstalk and stalker, but then came the problem of updating the view instantly without the need to refresh the page when stalker/beanstalk finish.
Apparently i was the only one who didnt know how it was done but i still could not find a good example. Then in episode 281 i saw you were using faye with stalker.
I did figure out how to update the view with faye from stalker, but, could you touch this topic in a future episode? i think is a very common problem and there is not much documentation out there about how to update the view asynchronously after a background process finishes working.
Wow soooo awesome i always neglected engines but from now ill see how i can apply them to my apps