uninitialized constant Rake::DSL

what will we do when we get error–uninitialized constant Rake::DSL at the time of rake db:create add    require ‘rake/dsl_definition’  above require ‘rake’  in your rakefile

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)

To change current status of linkedin from your own site.

Add this code in the function which you call from authentication(function) Like:: function onLinkedInAuth() { IN.API.Profile(“me”).fields(“id”,”firstName”, “lastName”, “industry”, “numConnections”,”educations”,”location”,”headline”,”publicProfileUrl”).result(CurrentStatus); } function CurrentStatus(profiles) { member = profiles.values[0]; document.getElementById(‘LinkedIn_Id’).value=member.id; //This function updates the status IN.API.Raw(“/people/~/current-status”) // Update (PUT) the status .method(“PUT”) .body(JSON.stringify(“linked