-
FTP script to automate file transfers to remote server
Below you will find a FTP script that will allow you to automate your files transfers without requiring any user input. The only problem with this method is you will be putting a username and password into the script file, but having a simple automated FTP file upload or FTP file download probably outweighs the drawback.
So to describe what this script does:
First the script will tar and zip all files and folders in the /var/log/ folder to the home directory of the user who runs the script. This will create a dated zip file in the user’s home folder who ran the script. Then it will FTP the files to the remote host. You can then add the script to a cron job to execute it everyday, week, hour, etc.
Read the rest of this entry » -
Installing Mongrel with Ruby 1.9
Installing mongrel on ruby 1.9 has caused problems for many different people as has been reported on isitruby19.com.
Running gem install mongrel produces the following error.
http11.c: In function ‘http_field’:
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c:77: warning: left-hand operand of comma expression has no effect
http11.c: In function ‘header_done’:
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:174: error: ‘struct RString’ has no member named ‘ptr’
http11.c:176: error: ‘struct RString’ has no member named ‘ptr’
http11.c:177: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘HttpParser_execute’:
http11.c:298: error: ‘struct RString’ has no member named ‘ptr’
http11.c:299: error: ‘struct RString’ has no member named ‘len’
make: *** [http11.o] Error 1To install mongrel after receiving this error, just follow these steps: Read the rest of this entry »
-
Installing MySQL gem for Ruby 1.9.x
As of this writing, the MYSQL gem cannot be installed by simply doing a GEM INSTALL with ruby 1.9.1. In order to install the gem, follow these easy steps.
First download the mysql gem from rubyforge, and unzip it:
sudo wget https://rubyforge.org/frs/download.php/51087/mysql-ruby-2.8.1.tar.gz sudo tar -xzvf mysql-ruby-2.8.1.tar.gz cd mysql-ruby-2.8.1
-
Setting Up Ubuntu for Rails Development
These are a the procedures we use to setup a PC or VM for development of a ruby on rails application.
First things first, get your install software ready. These instructions are based on the Hardy Heron version of Ubuntu (8.04).
Install the base OS and then fire up the terminal so you can copy and paste the following commands.
So once you have the base installed, make sure your distribution is up to date:
sudo apt-get update
sudo apt-get dist-upgrade -
Easy Way to Change Ubuntu Usernames
If you want to change your Ubuntu user name, a very fast way to do so is via the command line.
Just type the following:
sudo usermod -l newname currentname
For more options, just type
man usermod