Quantcast
Channel: Scriptrunner's Blog
Browsing latest articles
Browse All 10 View Live

Image may be NSFW.
Clik here to view.

Rack::Flash

In the past when I’ve needed Rails-like session flash in a Sinatra app, I had to hand roll my own (which, admittedly, is pretty fun) and add it as a helper. But now it’s a much better idea to use...

View Article


Image may be NSFW.
Clik here to view.

How do I learn and master Sinatra?

http://rubylearning.com/blog/tag/learning-sinatra/

View Article


Image may be NSFW.
Clik here to view.

Testing nested resources with rspec

I’ve been using rspec quite a bit lately, but ran into a small roadblock when I needed to test nested resources in Rails. After a quick Google search and a few IMs later, here’s the solution I came up...

View Article

Image may be NSFW.
Clik here to view.

50+ Ruby-related Blogs to Read

http://rubylearning.com/blog/2009/03/12/50-ruby-related-blogs-to-read/

View Article

Image may be NSFW.
Clik here to view.

Format ruby code for your blog

I started using Scanty for this blog and found that I needed to learn a little about Syntax, Jamis Buck’s gem used to do the formatting. Here are a few resources that got me going…...

View Article


Image may be NSFW.
Clik here to view.

Rendering different layouts with Sinatra

My first post on this blog was Explicit layouts for Sinatra. There was a post (Rendering different layouts with Sinatra) a few days ago on GITTR that uses a similar technique, though they use one...

View Article

Image may be NSFW.
Clik here to view.

Ruby Tip #1: No braces required to interpolate global, instance, or class...

Right there on page 15 of the Pickaxe is where you’ll find today’s tip. When interpolating variables within a double quoted string, we typically use #{var_name} to interpolate variables. Ruby provides...

View Article

Image may be NSFW.
Clik here to view.

Symbol#to_proc (&:)

If you’ve ever seen “&:” and wondered what it does, then here’s a quick overview of what this little shortcut can do. I’ve provided a simple example without going too deep into the details. (but...

View Article


Image may be NSFW.
Clik here to view.

Sending email with Ruby on Rails 2.3.2+ and Gmail

I’ve seen several posts on using Gmail with Ruby on Rails ActionMailer, but had to go through a little trial and error to get it to work. First, you’ll need collectiveidea’s action_mailer_optional_tls...

View Article


Image may be NSFW.
Clik here to view.

Compile Gnuplot on Mac Snow Leopard

There is an incompatibility between Gnuplot and the readline library shipping with Snow Leopard (and 10.5). If you get these errors: Undefined symbols: “_rl_ding”, referenced from: _alert in mouse.o...

View Article
Browsing latest articles
Browse All 10 View Live