Archive for October, 2008
undefined method `init_gettext’ for ApplicationController:Class
In : ruby, Posted by admin on Oct.10, 2008
I just updated to rails 2.1.2 and see this error:
undefined method `init_gettext’ for ApplicationController:Class
To resolve it.
- make sure you have the latest gettext gems.
- if it does not help, try add this to the first line of your app/controllers/application.rb
- require ‘gettext/rails’
Tags : ruby
mysql output csv file
In : mysql, Posted by admin on Oct.10, 2008
Here is the code to output result to csv file.
SELECT order_id,product_name,qty
FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
Tags : mysql
sendmail 451 Name server timeout
In : linux, system, Posted by admin on Oct.10, 2008
This is something related to sendmail IPv6 support.
- cd /etc/mail
- sendmail.mc and add the following at the end of the file:
- define(`confBIND_OPTS’, `WorkAroundBrokenAAAA’)dnl
- type make
- restart sendmail
Tags : sendmail
hadoop hbase ec2 installation
In : system, Posted by admin on Oct.10, 2008
Here is the steps by steps hbase ec2 installation.
- start elasticfox
- create a “keypairs”
- on your “security groups” default group, add port 50000-51000 (for hadoop) and port 60000-61000 (for hbase)
- search for hbase AMI (ami-4de30724)
- launch the install with the newly create keypair and default group permission
- on you desktop linux/window machine do: ssh -i <keypair.pem> root@<your new instance IP>
- replace the <keypair.pem> with the newly create keypairs pem file
- replace <your new instance IP> to your newly create instance IP address
- step 2 will login your ec2 machine. Then do the following:
- type: ssh-keygen -t dsa -P ” -f ~/.ssh/id_dsa
- type: cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
- type: ssh localhost
- If it does not ask you for the password, you are okay.
- type: exit
- vi /usr/local/hadoop-0.17.1/conf/hadoop-site.xml
- replace: <value>hdfs://:50001</value> to <value>hdfs://INSTANCE IP ADDRESS:50001</value>
- replace: <value>:50002</value> to <value>INSTANCE IP ADDRESS:50002</value>
- type: /usr/local/hadoop-0.17.1/bin/hadoop dfs namenode -format
- type: /usr/local/hadoop-0.17.1/bin/start-all.sh
- check /mnt/hadoop/logs/hadoop-root-namenode-<….>.log and make sure that your hadoop is starting correctly.
- vi /usr/local/hbase-0.2.0/conf/hbase-site.xml
- replace: <value>:60000</value> to <value>INSTANCE IP ADDRESS:60000</value>
- replace: <value>hdfs://:50001/hbase</value> to <value>hdfs://INSTANCE IP ADDRESS:50001/hbase</value>
- type: /usr/local/hbase-0.2.0/bin/start-hbase.sh
- check /mnt/hbase/logs/* to make sure your hbase is start correctly.
- if everything is okay, you can point your browser to: http://INSTANCE IP ADDRESS:60010/ and see the hbase information.