about 1 month ago - 2 comments
Returns Time.zone.now when config.time_zone is set, otherwise just returns Time.now
about 3 months ago - 1 comment
Array#rand is deprecated in favor of Array#random_element and will be removed in Rails 3. As per the comment added to the commit: Array#rand is deprecated because it masks Kernel#rand within the Array class itself, which may be used by a 3rd party library extending Array in turn. See https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4555
about 3 months ago - 7 comments
New edge rails deprecations: Time#last_year is deprecated in favor of Time#prev_year Time#last_month is deprecated in favor of Time#prev_month Date#last_year is deprecated in favor of Date#prev_year Date#last_month is deprecated in favor of Date#prev_month New methods/aliases: Date#sunday: Returns a new Date representing the end of this week Time#sunday: Returns a new Time representing the end of this
about 4 months ago - 1 comment
Using ftp to download multiple files using ‘mget’ command is pretty common, however it downloads files from current directory only. But if you need to download recursive directories with all its content then? And specially when you don’t have shell access to the remote machine and you don’t have access to archive the targeted folder?
about 4 months ago - 1 comment
Just a quick note, If you are getting “uninitialized constant ActionMailer::Quoting::Encoding” while using ActionMailer, then make sure that your mailer look like: class Notifier < ActionMailer::Base def signup_notification(recipient) recipients recipient.email_address_with_name bcc ["bcc@example.com"] from "system@example.com" subject "New account information" body :account => recipient end end Actually, yesterday we were getting “uninitialized constant ActionMailer::Quoting::Encoding” while using ActionMailer
about 5 months ago - 5 comments
Cross Posted from http://vinsol.com/blog Contrary to popular belief, working on a client project gives us a generous margin of creativity and explore innovative solutions.Take the example of a recent project I was working on. The client required a collaboration-based calendar module for their application similar to Google Calendar. Initially we started developing it from scratch
about 9 months ago - 2 comments
Cross Posted from http://vinsol.com/blog At VinSol, we have been developing and deploying Rails applications for more than four years. During this period, we have identified some best practices that we prefer to follow while deploying rails application to production server. Below is the checklist of these practices: 1. Ensure that NS records and MX
about 9 months ago - 1 comment
Want to see information about your git repository? Based on a discussion here Duane Johnson wrote a very useful bash script. I am using this script from months and would like to share with you. You can download this script here(). You can also add an alias like below, so that I can be a
about 1 year ago - 9 comments
If you guys want to change timezone of your ubuntu machine then you can do it by issuing: dpkg-reconfigure tzdata This may be helpful if you deal with servers.
about 1 year ago - 1 comment
Three-Four days ago I was in a situation where I need to have multiple versions of ruby and rubygems on my ubuntu machine. I was lucky, I found an awesome article http://blog.michaelgreenly.com/2008/08/multiple-versions-of-ruby-on-ubuntu-2.html. This really solved my problem, Many thanks to Michael Greenly.
about 1 year ago
http://github.com/timcharper/role_requirement/tree/master
most current