Year: 2009

  • Ruby Script to Add Apache Virtual Host Entry

    Creating a Ruby script to automate the addition of Apache Virtual Host entries can significantly streamline the process of managing a web server, especially for developers and system administrators who frequently need to add new sites. This approach exemplifies the power of Ruby for system administration tasks, leveraging its simplicity and effectiveness to interact with…

  • Ruby Net::FTP Tutorial

    Ruby Net::FTP Tutorial

    In the vast universe of Ruby programming, the Net::FTP class offers a powerful way to interact with FTP servers, allowing you to transfer files, list directories, and perform a variety of other tasks over the network. Before we dive into the practical “how-tos,” let’s understand the theoretical foundation of using FTP with Ruby. Understanding Net::FTP…

  • Create your own custom rails generator

    Rails generators are powerful tools that speed up the development process by creating boilerplate code, files, and directories. From initializing a new Rails application to generating models, controllers, and migrations, generators are integral to Rails development. However, there might be times when the built-in generators don’t meet your specific needs. In such cases, creating a…

  • Changing Paperclip File Storage Location in Ruby on Rails

    Paperclip was once a wildly popular attachment management library for Ruby on Rails, allowing developers to easily attach files to ActiveRecord objects. Although it has been deprecated in favor of Active Storage, many legacy Rails applications still use Paperclip. One common requirement in such applications is changing the storage location of uploaded files, whether for…