ruby -r rubygems -e "p Gem.path"
gem env
Various things that I read and meet everyday.
sun-java6-bin (6-15-1) を設定しています ...
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/ControlPanel to provide /usr/bin/ControlPanel (ControlPanel) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/java_vm to provide /usr/bin/java_vm (java_vm) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/jcontrol to provide /usr/bin/jcontrol (jcontrol) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode.
sun-java6-jre (6-15-1) を設定しています ...
sun-java6-jdk (6-15-1) を設定しています ...
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/HtmlConverter to provide /usr/bin/HtmlConverter (HtmlConverter) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/appletviewer to provide /usr/bin/appletviewer (appletviewer) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/apt to provide /usr/bin/apt (apt) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/extcheck to provide /usr/bin/extcheck (extcheck) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/idlj to provide /usr/bin/idlj (idlj) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jar to provide /usr/bin/jar (jar) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jarsigner to provide /usr/bin/jarsigner (jarsigner) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/java-rmi.cgi to provide /usr/bin/java-rmi.cgi (java-rmi.cgi) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/javac to provide /usr/bin/javac (javac) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/javadoc to provide /usr/bin/javadoc (javadoc) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/javah to provide /usr/bin/javah (javah) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/javap to provide /usr/bin/javap (javap) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jconsole to provide /usr/bin/jconsole (jconsole) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jdb to provide /usr/bin/jdb (jdb) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jhat to provide /usr/bin/jhat (jhat) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jinfo to provide /usr/bin/jinfo (jinfo) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jmap to provide /usr/bin/jmap (jmap) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jps to provide /usr/bin/jps (jps) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jrunscript to provide /usr/bin/jrunscript (jrunscript) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jsadebugd to provide /usr/bin/jsadebugd (jsadebugd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jstack to provide /usr/bin/jstack (jstack) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jstat to provide /usr/bin/jstat (jstat) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/jstatd to provide /usr/bin/jstatd (jstatd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/native2ascii to provide /usr/bin/native2ascii (native2ascii) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/rmic to provide /usr/bin/rmic (rmic) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/schemagen to provide /usr/bin/schemagen (schemagen) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/serialver to provide /usr/bin/serialver (serialver) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/wsgen to provide /usr/bin/wsgen (wsgen) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/wsimport to provide /usr/bin/wsimport (wsimport) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/bin/xjc to provide /usr/bin/xjc (xjc) in auto mode.
set -- *.ps
if [ -f "$1" ]
then
w3flag=$#
else
w3flag=0
fi
shopt -s nullglob
x=(ABC*)
if [ -n "$x" ]; then
echo foo
else
echo bar
fi
set -xv # enable debugging
rm -rf `find . -name .svn`
find . -name .svn -prune -exec rm -rf {} \;
for /f “tokens=* delims=” %%i in (’dir /s /b /a:d *svn’) do (
rd /s /q “%%i”
)
rpm -qa --queryformat="%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" | sort > file
rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n"
$ python scons/scons.py -h
scons -c install
http://maps.google.com/maps/geo?q=地名&key=APIキー&sensor=false&output=xml&oe=utf8&gl=jp
http://maps.google.com/staticmap?center=35.010517,135.759638&zoom=15&size=480x270&maptype=mobile&markers=35.010117,135.758638,reda%7C35.010417,135.759538,blueb&key=YOUR_API_KEY
<Proxy balancer://mongrel_cluster>
BalancerMember http://127.0.0.1:8000
BalancerMember http://127.0.0.1:8001
</Proxy>
<VirtualHost *:80>
ServerName myapp.com
DocumentRoot /Library/Rails/myapplication/current/public
<Directory "/Library/Rails/myapplication/current/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
</VirtualHost>
# On your local computerThe -p 8000 parameter specifies that the mongrel instances will start up on ports beginning with 8000 on your deployment server. The -a 127.0.0.1 parameter will set up Mongrel to listen to the localhost interface. The -N 2 parameter indicates that two instances of Mongrel will be started. And, the -c /deploy/path/current argument is where your application will be deployed to on the remote server. Note that the word current in this path is required: the /deploy/path part is the path to your application, and current is a directory that Capistrano creates inside that application structure.In the Capistrano recipes that follow, the deployment path is set to /Library/Rails followed by the name of your application. If you follow this scheme for an application named blog, the -c option in the previous example would read -c /Library/Rails/blog/current.
$ mongrel_rails cluster::configure -e production -p 8000 -a 127.0.0.1 -N 2 -c /deploy/path/current
sed s/ENGINE=InnoDB/ENGINE=NDBCLUSTER/g world.sql > databaseCluster.sql
sudo gem install --include-dependencies capistrano
# On your local computer
$ cap --apply-to /local/project/path [applicationname]
exists config
create config/deploy.rb
exists lib/tasks
create lib/tasks/capistrano.rake
$ rake remote:code_deploy
$ gem install mongrel
$ gem install mongrel_cluster
# First, reserve a port number by going into the WebFaction control panel and creating a new app of type "Custom App listenting on port".
MY_PORT=PUT_THE_PORT_NUMBER_HERE
mkdir -p ~/mysql/.src
cd ~/mysql/.src/
# Download and extract the Mysql source code:
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51b.tar.gz/from/http://mirror.services.wisc.edu/mysql/
tar xf mysql-5.0.51b.tar.gz
cd mysql-5.0.51b
./configure --prefix=$HOME/mysql
make
# Go take a 30-minute break...
make install
cat > $HOME/mysql/my.cnf << EOF
[mysqld]
port=$MY_PORT
socket=$HOME/mysql/mysql.sock
basedir=$HOME/mysql
datadir=$HOME/mysql/data
[client]
port=$MY_PORT
socket=$HOME/mysql/mysql.sock
EOF
echo export PATH=$HOME/mysql/bin:$PATH >> ~/.bash_profile
source ~/.bash_profile
mysql_install_db --basedir=$HOME/mysql --datadir=$HOME/mysql/data
# Start the MySQL Server:
cd $HOME/mysql; mysqld_safe --defaults-file=$HOME/mysql/my.cnf &
# Choose a password for root:
mysqladmin -u root password "aPasswordForRoot"
./configure –prefix=/home/mysql –with-extra-charsets=all –with-mysqld-user=mysql –enable-thread-safe-client –with-plugins=ndbcluster
gem install activesupport --local
gem install rails -p http://proxy:8080/
gem fetch
> COPY /B liveandroidv0.2.iso.001 +liveandroidv0.2.iso.002 liveandroidv0.2.iso
$ cat liveandroidv0.2.iso.001 liveandroidv0.2.iso.002 > liveandroidv0.2.iso
$ sudo gem install ruby-debug
require 'ruby-debug'
class SignupController < ApplicationController
def check_for_service
debugger
@query = params[:q]
(...)
$ script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart).
** Rails signals registered. HUP => reload (without restart). It might not
work well.
** Mongrel available at 0.0.0.0:3000
** Use CTRL-C to stop.
app/controllers/signup_controller.rb:5 @query = params[:q]
(rdb:1)
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.clear_active_connections!