• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

参考:http://blog.livedoor.jp/farend/archives/609528.html

Mac OS X用のNetBeans 6.5でSubversionにコミットするとき、ログメッセージに日本語が含まれていると下記のエラーが表示されて失敗します。

Commit failed (details follow): Can't convert string from native encoding to 'UTF-8':

~/.subversion/config に下記の設定を追加してNetBeansを再起動すると、ログメッセージに日本語を使っても問題なくコミットできるようになります。

log-encoding = utf8

posted by Face ysakaki on Wed 31 Dec 2008 at 03:25

WordPressとRailsを動かすためにMySQLとRuby/gem/Railsをインストールする。

mysql5のインストール

# aptitude install mysql-server mysql-client libmysqlclient15-dev

# aptitude install libmysql-ruby1.8

文字コードをUTF8に設定

/etc/mysql/my.cnf に下記内容を追記。

[client]

default-character-set=utf8

[mysqld]

default-character-set=utf8

# /etc/init.d/mysql restart

# mysql> status でlatin1が混じっていないか確認する。

mysqladminのインストール

# aptitude install mysql-admin

Ruby1.8.7インストール

# aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby sqlite3 libsqlite3-ruby1.8

# sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby

# sudo ln -s /usr/bin/ri1.8 /usr/bin/ri

# sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc

# sudo ln -s /usr/bin/irb1.8 /usr/bin/irb

# ruby -v

ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

gem1.3.1のソースインストール

# cd /usr/local/src/

# wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz

# tar xvf rubygems-1.3.1.tgz

# cd rubygems-1.3.1

# ruby setup.rb

# ln -s /usr/bin/gem1.8 /usr/bin/gem

# gem -v

1.3.1

# gem update

# gem install rails

Railsのインストール

# rails -v

Rails 2.2.2

ImageMagickのインストール

# aptitude install imagemagick librmagick-ruby1.8 librmagick-ruby-doc libfreetype6-dev xml-core -y

# aptitude install libmagick9-dev # export GEM_HOME=/var/lib/gems/1.8 # export RUBY_LIB=/usr/lib # gem install rmagick Successfully installed rmagick-2.8.0

posted by Face ysakaki on Sun 14 Dec 2008 at 03:37

www:一般公開用サイト

dev:テスト用サイト

blog:開発用ブログ

とします。

root@onering:~# cd /var/www/ root@onering:/var/www# ls index.html root@onering:/var/www# cat index.html

It works!

root@onering:/var/www# cd ../ root@onering:/var# ls backups cache lib local lock log mail opt run spool tmp www root@onering:/var# cd /etc/apache2/sites-available/ root@onering:/etc/apache2/sites-available# ls default default-ssl root@onering:/etc/apache2/sites-available# nano footfun.jp root@onering:/etc/apache2/sites-available# su - ysakaki ysakaki@onering:~$ pwd /home/ysakaki ysakaki@onering:~$ mkdir footfun.jp ysakaki@onering:~$ cd footfun.jp/ ysakaki@onering:~/footfun.jp$ ls ysakaki@onering:~/footfun.jp$ mkdir www ysakaki@onering:~/footfun.jp$ mkdir log ysakaki@onering:~/footfun.jp$ exit logout root@onering:~# a2ensite footfun.jp Enabling site footfun.jp. Run '/etc/init.d/apache2 reload' to activate new configuration! root@onering:~# /etc/init.d/apache2 reload

  • Reloading web server config apache2 ...done. root@onering:~# su - ysakaki ysakaki@onering:~$ mkdir dev.footfun.jp ysakaki@onering:~$ mkdir blog.footfun.jp ysakaki@onering:~$ mkdir blog.footfun.jp/www ysakaki@onering:~$ mkdir blog.footfun.jp/log ysakaki@onering:~$ mkdir dev.footfun.jp/www ysakaki@onering:~$ mkdir dev.footfun.jp/log ysakaki@onering:~$ exit logout root@onering:~# cd /etc/apache2/sites-available/ root@onering:/etc/apache2/sites-available# ls default default-ssl footfun.jp root@onering:/etc/apache2/sites-available# cp footfun.jp dev.footfun.jp root@onering:/etc/apache2/sites-available# cp footfun.jp blog.footfun.jp root@onering:/etc/apache2/sites-available# nano dev.footfun.jp root@onering:/etc/apache2/sites-available# nano blog.footfun.jp root@onering:/etc/apache2/sites-available# a2ensite dev.footfun.jp Enabling site dev.footfun.jp. Run '/etc/init.d/apache2 reload' to activate new configuration! root@onering:/etc/apache2/sites-available# a2ensite blog.footfun.jp Enabling site blog.footfun.jp. Run '/etc/init.d/apache2 reload' to activate new configuration! root@onering:/etc/apache2/sites-available# /etc/init.d/apache2 reload
  • Reloading web server config apache2 ...done.
posted by Face ysakaki on Sun 14 Dec 2008 at 02:19

Slicehostと契約したら最初にやること。ということで先月契約してCentOS5.2にしていたのだがパッケージが古くてソフトのインストールが面倒なことが多くなってきたように思うのでUbuntuでRebuild。仮想環境なので専用コントロールパネルからRebuildメニューでディストロ選択して10分でまっさらな状態になるというのは素晴らしいですね。

#ssh root@173.45.224.x でsshログインする。

Slicehostはroot権限くれて勝手にやっていいよという環境ですが素晴らしいチュートリアル一式が付いているのでセキュリティの初期設定やらapache/mysql/railsなどの環境構築一式すぐできます。 http://articles.slicehost.com/ubuntu-intrepid

まずはログイン環境のセキュリティ強化かな。

http://articles.slicehost.com/2008/11/28/ubuntu-intrepid-setup-page-1 #passwd でrootのパスワードを変更する。

#adduser demo でログイン用のユーザを作成する。

#visudo で下記行を追加する。 demo ALL=(ALL) ALL

#vi /etc/ssh/sshd_config

#/etc/init.d/ssh reload

posted by Face ysakaki on Sat 13 Dec 2008 at 22:20

エクセルの質問・回答表などで行ごとに色分けしたい場合。 「条件付き書式」機能を使えば良い。

http://support.microsoft.com/kb/268568/ja

posted by Face ysakaki on Fri 12 Dec 2008 at 17:29

「RSpec1.1.5からはautospecでautotest相当のことができる」ということを#rails-tokyoのIRCで教えてもらいました。autospec(autotest)を使うと、specファイル保存時にrspecが走ります。ので、rake specとかruby script/rails_spec spec/models/testmodel_spec.rbとか毎回打つ必要がなくなります。余計なウィンドウ移動が減って、コードに集中できるのはすばらしい!

 

--
12:15 (ysakaki) WindowsXPの環境でRSpeccのautotest動かせてる方いますか?
12:19 (yoshuki_) こんにちは、1.1.5からautospecコマンドになってますよ
12:22 (ysakaki) なんと!
12:23 (walf444) autospecついてるけど中でautotestをsystemでよんでるだけと角谷さんがいってたような気がする
12:25 (ysakaki) でけました!
--

walf444さんありがとう!

posted by Face ysakaki on Tue 9 Dec 2008 at 18:00

もう一つのブログで

『まつもとさんに「Matz likes Merb(more than Rails)」の真相を聞く』というエントリーを書きました。 http://d.hatena.ne.jp/onering/20081203/1228273797

競争があるのはいいことで結果的に両者の機能強化につながればいいなと思います。

posted by Face ysakaki on Wed 3 Dec 2008 at 13:17
Contents
MacOS X(10.5)のNetBeans6.5でコミットエラーが出る場合
[Slicehost]MySQLとRuby/Railsの導入
WEBサービス用のapache設定を追加する
Slicehostと契約したら最初にやること
Excel で1行おきに色付けする方法
RSpec1.1.5からはautospecコマンドでautotest相当のことができる
まつもとさんに「Matz likes Merb(more than Rails)」の真相を聞く
Comments
satoko: 私もGIMP入れてみたんですよ、で、同じ文字化け。 言語の優先順位を1.English、2:... '08-11
榊 祐介: >satokoさん コメントありがとうございます。 画像編集はGIMPを入れてみたのですがい... '08-11
satoko: しまったsubmitするの忘れてたのですが、昨日書いていたコメントです。^^ '08-11
satoko: あわあわ、私も今日までずっと困っていました。先ほど別のところでこの設定方法を学んだところです!... '08-11
榊 祐介: 検索したら自分のブログだった乙orz '08-11
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ