RailsCasts Pro episodes are now free!

Learn more or hide this

AstonJ's Profile

GitHub User: AstonJ

Site: http://astonj.com

Comments by AstonJ

Avatar

Another awesome cast - I love how in the end there are no queries!

Avatar

+1

I'd love to see a cast on Redis taking activity feeds to the next level Ryan :)

Avatar

I was just about to ask Ryan if he could do a cast on how to achieve this from scratch... with something like Redis :)

Could you write a blog post about implementing a simple activity tracker from scratch Jon? Interested to see how you approach it.

Avatar

Thanks Brandon. I have actually done most of the Code School stuff :) Do you have any book recommendations?

Avatar

Thanks Brandon, that's a really helpful post. Would you have any recommendations on learning JS/CS for a JS Noob that knows Rails/Ruby?

Btw, great site too! I searched for Rails and one of my blog posts showed up :D

Avatar

Thanks - will check them out :)

Avatar

+1

Awesome episode Ryan! Especially for a JS phobe like me!

Does anyone know of any good books that teach you how to use JS/jQuery/CS with Rails from scratch?

Avatar

Great cast Ryan! I used FOG recently via the Ruby Backup gem - to keep DB backups on S3, as well as a few different mirrors for user uploads. Great gem! Thanks again for the cast.

Avatar

Just a quick note if anyone else gets 'Dalli::RingError: No server available' (or it just says false when you try to write to the cache) I had run it as:

memcached -l localhost

..and then it worked fine.

Avatar

Another great video Ryan!

I would like to see something on the Russian doll technique that DHH often refers to too - perhaps with an update to the PJAX cast as well, as I think it's changed significantly since the episode that covered it.

Avatar

Is anyone else getting odd behaviour?

For example, when I search 'police' I don't get any results, but when I search 'polic' I do! (Police exists in the content I am searching). It is also not returning some results at all - yet I know the word exists, whether the word is large or small.

When I start rails dbconsole it says I am using 9.1.4, so that seems ok, and the rest of the site seems to be functioning as usual too.

Do I need to rebuild indexes or something? Can anyone suggest anything else?

Avatar

Thanks Roland - they look like good options!

Avatar

I'm using Mini Magick, partly because of reported problems with Rmagick and because Rmagick didn't play nicely on my set-up.

Avatar

Another great screencast Ryan!

If anyone's looking for a good book to read on DBs, PragProg's 7 Databases in 7 Weeks is excellent. Which reminds me I need to finish it!

Avatar

Hi @Sam - it works fine on my development machine but not on my production server, I get an 'Internal Server Error' and my production log shows:

Filter chain halted as #<Proc:0x000000059a2f68@/my_apps/apps/app_name/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/http_authentication.rb:112> rendered or redirected

Any ideas what's going on?

EDIT: I removed the http_basic_authenticate_with but it's still not working and there are no other clues in the log file :/

Avatar

Cheers Pranay.

In case anyone else is using Kaminari - you might need to change '.next_page' to '.next' :)

Avatar

Awesome - thanks! This makes me feel a lot better about my app :D

Would love to see a similar episode on performance (slow queries etc) although knowing Ryan he has probably already done one!

Avatar

Thanks Ryan! And I picked up another text mate tip, CTRL + Shift + H (create partial from template). Actually, do you reckon that could make for a good topic? TextMate tips?

Avatar

For those of you having problems with mini_magic, this worked for me:

ruby
  def crop
    if model.crop_x.present?
      resize_to_limit(600, 600)
      manipulate! do |img|
        x = model.crop_x
        y = model.crop_y
        w = model.crop_w
        h = model.crop_h
        img.crop "#{w}x#{h}+#{x}+#{y}"
        img
      end
    end
  end
Avatar

This worked for me as well, thanks! :)

Avatar

Thanks Omar.

Just a quick note to say I asked the author of postgresguide.com if he could post some tips on backing up and restoring, and he promptly published the following page!

http://postgresguide.com/tips/backup-restore.html

I think with that info and Ryan's screencast... I am ready to give PG a go :D

Avatar

Nice one Ryan! I've been thinking about switching ot PG.

If you do a follow-up, could you cover how to do a PG version of a mysqldump please? And then how to put such a dump back into a (new) DB?
(Or some other way to backup/restore a db, thanks!)

Edit: just found:
http://linux.die.net/man/1/pg_dump
http://linux.die.net/man/1/pg_restorev

Avatar

Nice one Ryan - I blogged something similar a few days ago too (it includes DHH's example on how he deals with MAS as well) http://astonj.com/tech/rails-mass-assignment-security/

Avatar

Devise has quite a few options like being able to verify accounts via email, recovery of lost passwords, temporarily blocking accounts with x number of failed log-ins etc.

Avatar

Another awesome episode Ryan!

I'd also like to add my support for a follow up episode that covers cancellations, insufficient funds etc

Just want to add that it's watching episodes like this that shows what a fantastic Ruby coder you are Ryan! I always pick up some tip or another watching you code :)

Avatar

Great screencast Ryan!

I've also written a zero to hero guide on my blog (it's now also returned with the help! factoid in the official rails chat room) - check it out here: Best Way to Learn Ruby & Rails