10 Reasons why – Ruby on Rails

Your development team has been frustrating you, projects start and four weeks later the development team is still developing the framework, your budget is running out. You want productivity but just don’t know how to get it. Is there an

Convert utf-8 to chinese in ruby on rails

Sample code to send a utf-8 string in subject line of email. Its pretty simple and straight forward   def send_to_lead(lead_email, from_email, from_name, offer_id, club_id, customer_id) @customer_name = from_name @customer_email = from_email str = “期待很快就可!” #    str= “subject in english”

Rails ActionMailer STARTTLS bug solution

This is a common rails mailer issue and bug new programmers, Net::SMTPAuthenticationError in InviteController#send_email_invites 530 5.7.0 Must issue a STARTTLS command first. u10sm46215072pbr.12 the solution of this problem is to include following settings in your environment.rb file config/environments/development.rb ———————————–  

Difference between ‘sudo’ & ‘su -c’ commands

Hello everyone, For those who are interested, i would like to highlight the differences between using ‘sudo’ and ‘su -c’ commands. Although, it will be applicable to all linux distributions, in this blog i am going to concentrate on Ubuntu

Install pure-ftpd & restrict users to their home directories (Fedora/openSuse)

Hello everyone, Steps to install pure-ftpd and jail users: Note-1) On typing ‘ftp localhost’, if you get “Install command ‘ftp’ to provide command ‘ftp’? [N/y]” error message, don’t worry that perfectly normal.  Simply type y. This is “ftp client binary”,

Install pure-ftpd & restrict users to their home directories (Ubuntu)

Hello everyone, Steps to install pure-ftpd and jail users: Step-1) To install pure-ftpd, on the terminal type: sudo apt-get -y install pure-ftpd Step-2) To jail users to their home directories, on the terminal type:         cd /etc/pure-ftpd/conf         sudo touch

Install vsftpd & restrict users to their home directories (Fedora/openSuse)

Hello everyone, Steps to install vsftpd and jail users to their home directories: Note-1) On typing ‘ftp localhost’, if you get “Install command ‘ftp’ to provide command ‘ftp’? [N/y]” error message, don’t worry that perfectly normal.  Simply type y. This

Install vsftpd & restrict users to their home directories (Ubuntu)

Hello everyone, Steps to install vsftpd and jail users to their home directories: Step-1) To install vsftpd, on the terminal type: sudo apt-get -y install vsftpd Step-2) To edit vsftpd configuration file, on the terminal type: sudo [nano/vi/emacs] /etc/vsftpd.conf Step-3)

Guide to create virtual-user in pure-ftpd

NOTE: It is assumed that you are using root login.   ‘Fedora / RedHat / OpenSuse’ users: Step 1) Open terminal window and type: yum install -y pure-ftpd   Ubuntu / Debian users: Step 1) Open terminal window and type:

Storing Sessions in the Database

We generally use cookie based session storage technique.Storing sessions in the database in however very important. Rails provide an built-in feature using rake to create session table . Create Migration $ rake db:sessions:create The above command will create the migration