• RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

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?

In such situation you can use ‘wget’ to download all recursive directories by providing your ftp details. For example:

[bash]

wget -rc –user=’ftpusername’ –password=’ftppassword’ ftp://domain.com/directory_path/

[/bash]

Continue

uninitialized constant ActionMailer::Quoting::Encoding

Just a quick note, If you are getting “uninitialized constant ActionMailer::Quoting::Encoding” while using ActionMailer, then make sure that your mailer look like:

[ruby]
class Notifier < ActionMailer::Base
def signup_notification(recipient)
recipients recipient.email_address_with_name
bcc ["[email protected]"]
from "[email protected]"
subject "New account information"
body :account => recipient
end
end
[/ruby]

Actually, yesterday we were getting “uninitialized constant ActionMailer::Quoting::Encoding” while using ActionMailer in production but it was working fine in all modes(development/production) on localhost. Our mailer was like:

[ruby]
class Notifier < ActionMailer::Base
def signup_notification(recipient)
@recipients = recipient.email_address_with_name
@bcc = ["[email protected]"]
@from = "[email protected]"
@subject = "New account information"
@body = :account => recipient
end
end
[/ruby]

We could not find the actual issue with this mailer. But the above said error was disappeared when we changed the same mailer as following:

[ruby]
class Notifier < ActionMailer::Base
def signup_notification(recipient)
recipients recipient.email_address_with_name
bcc ["[email protected]"]
from "[email protected]"
subject "New account information"
body :account => recipient
end
end
[/ruby]

Do you guys have any idea? I would love to listen from you.

Update: No its not solved yet. Still same issue. May be some issue with character encoding with the TMail object. :(

Update 2: This was the issue http://github.com/hmcgowan/roo/issues#issue/4/comment/106328

Continue

Jquery Full Calendar with RubyOnRails


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 , but then, we found an awesome Jquery plugin.

FullCalendar” provides a full-sized, drag & drop calendar. It uses AJAX to fetch events on-the-fly for each month. It also supports an intuitive interface to manage events that spans over multiple days or weeks. It is visually customizable and exposes hooks for user-triggered events (like clicking or dragging an event).


I decided to give it a try and utilize its hooks for user triggered events within our Rails application. This small effort resulted in a barebone Rails app that might provide a good base for your project which require calendar, scheduling or appointment features. I called it fullcalendar_rails and it is now available on github with a working demo at http://fullcalendar.vinsol.com.



Update: Added recurring events functionality to the demo app.


Feel free to give your valuable feedback. I hope you will find this useful.


Continue

Asset Pipeline has been extracted a...

The asset pipeline which was introduced in Rails 3.1, has ...

ClientSideValidations: Add/Map mode...

#/status/256699237230845952

Action and Page caching has been ex...

With the commit c82cf81f00f Action and Page caching has been extracted ...

turbo-sprockets-rails3: Speeds up ...

#/status/253420357841723393

EdgeRails: ActiveRecord::SessionSto...

With the commit 3324e28804 ActiveRecord::SessionStore is extracted out of Rails into ...

Asset Pipeline has been extracted a...

The asset pipeline which was introduced in Rails 3.1, has ...

ClientSideValidations: Add/Map mode...

#/status/256699237230845952

Action and Page caching has been ex...

With the commit c82cf81f00f Action and Page caching has been extracted ...

turbo-sprockets-rails3: Speeds up ...

#/status/253420357841723393

EdgeRails: ActiveRecord::SessionSto...

With the commit 3324e28804 ActiveRecord::SessionStore is extracted out of Rails into ...