2009年7月3日金曜日

Waves チュートリアル Classic

前回のCompactはよくわからなくなったので、Classicに移ってみます。

まずはblogというアプリを作成。

%waves generate --name=blog --orm=sequel
** Waves 0.8.2 **
** Creating new Waves application ...

で、blogディレクトリができてるので、blogディレクトリ内でwaves実行

%cd blog/
%waves server
** Waves 0.8.2 **
no such file to load -- markaby

あら?markabyってのインストール?

%gem install markaby
Successfully installed builder-2.1.2
Successfully installed markaby-0.5
2 gems installed

これでOKかな?

%waves server
** Waves 0.8.2 **
Could not find RubyGem sequel (>= 2.0.0)

今度はsequelか。。。

%gem install sequel
Successfully installed sequel-3.2.0
1 gem installed

これでOKか?

%waves server
** Waves 0.8.2 **
I, [2009-07-03 18:58:10 #22553] INFO -- : Logger started.
I, [2009-07-03 18:58:10 #22553] INFO -- : Waves::Server starting ...
I, [2009-07-03 18:58:11 #22553] INFO -- : ruby-debug enabled
I, [2009-07-03 18:58:12 #22553] INFO -- : Mongrel started on 127.0.0.1:3000.

おぉ、なんかできたみたい♪
↓ランキング参加中!ポチッとお願いします。
ブログランキング・にほんブログ村へ人気ブログランキングへ

Waves チュートリアル CompactApps

英語で書かれててよくわからないけど、チュートリアルをやってみる。
CompactとClassicがあるみたいで、今回はCompactをやってみようと思います。
ちなみにClassicだとMVC形式のファイルがいろいろできるみたいです。

%waves generate --name=spit_ball --template=compact
** Waves 0.8.2 **
** Creating new Waves application ...
** Application created!

これでspit_ballというディレクトリができました。
その中を見てみるとstartup.rbというファイルがあるだけ。。コンパクトですw
内容は↓

require 'foundations/compact'

module SpitBall
include Waves::Foundations::Compact
end

とりあえず実行してみよう♪

%waves server
** Waves 0.8.2 **
I, [2009-07-03 16:48:02 #10441] INFO -- : Logger started.
I, [2009-07-03 16:48:02 #10441] INFO -- : Waves::Server starting ...
no such file to load -- ruby-debug

あら?ruby-debugをインストール?

%waves server
** Waves 0.8.2 **
I, [2009-07-03 16:48:02 #10441] INFO -- : Logger started.
I, [2009-07-03 16:48:02 #10441] INFO -- : Waves::Server starting ...
no such file to load -- ruby-debug
%gem install ruby-debug
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Successfully installed columnize-0.3.0
Successfully installed linecache-0.43
Successfully installed ruby-debug-base-0.10.3
Successfully installed ruby-debug-0.10.3
4 gems installed
Installing ri documentation for columnize-0.3.0...
Installing ri documentation for linecache-0.43...
Installing ri documentation for ruby-debug-base-0.10.3...
Installing ri documentation for ruby-debug-0.10.3...
Installing RDoc documentation for columnize-0.3.0...
Installing RDoc documentation for linecache-0.43...
Installing RDoc documentation for ruby-debug-base-0.10.3...
Installing RDoc documentation for ruby-debug-0.10.3...

これでいいのかな?

%waves server
** Waves 0.8.2 **
I, [2009-07-03 17:27:21 #14447] INFO -- : Logger started.
I, [2009-07-03 17:27:21 #14447] INFO -- : Waves::Server starting ...
I, [2009-07-03 17:27:22 #14447] INFO -- : ruby-debug enabled
no such file to load -- mongrel

次はmongrelか。。。

%gem install mongrel

と、先程と同じようにインストール◎
で再度実行!

%waves server
** Waves 0.8.2 **
I, [2009-07-03 17:28:52 #14567] INFO -- : Logger started.
I, [2009-07-03 17:28:52 #14567] INFO -- : Waves::Server starting ...
I, [2009-07-03 17:28:53 #14567] INFO -- : ruby-debug enabled
I, [2009-07-03 17:28:54 #14567] INFO -- : Mongrel started on 127.0.0.1:3000.

お!これで起動したのかな?

と思ったけど。。どうやって表示したらいいのかわからないwww
↓ランキング参加中!ポチッとお願いします。
ブログランキング・にほんブログ村へ人気ブログランキングへ

sakura にruby waves をインストール4 -まとめ-

前回もエラーのまま終わってしまったので、今回も続き。。。
なんかgemのenglishパッケージ内にstyleってディレクトリがないみたいだ。。。
調べたけど、よくわからんのでgem内のパッケージを全部削除して再度「waves」インストール♪
。。。で、rackのバージョンを1.0.0から0.9.1にして、
daemonsをインストールして、metaidをインストールして。。。
そしたらまたenglish/style (LoadError)ってのになった。。。
どうしたものかと思ってたけど、wavesを無事インストールした人のサイトを見てると
englishのバージョンが0.3.1だったので、

%gem install english --version 0.3.1
Successfully installed english-0.3.1
1 gem installed
Installing ri documentation for english-0.3.1...
Installing RDoc documentation for english-0.3.1...

で、最初にインストールされた0.4.0を削除

%gem uninstall english --version 0.4.0
Successfully uninstalled english-0.4.0

で、「waves」。。。

%waves
** Waves 0.8.2 **
Usage: waves [ generate | server | console ] [ options ]
Run a waves command with the given options. Use --help with any command to learn
more about that command. EXAMPLE: waves generate --help

お、できた♪
何か新しいバージョンにまだ対応してない?って感じでしょうか?
まぁできたからこれでOKってことで◎
結果gemの中はこんな感じになりました↓

%gem list

*** LOCAL GEMS ***

abstract (1.0.0)
autocode (1.0.0)
choice (0.1.3)
daemons (1.0.10)
english (0.3.1)
erubis (2.6.4)
extensions (0.6.0)
filebase (0.3.6)
functor (0.5.1)
highline (1.5.1)
live_console (0.2.1)
metaid (1.0)
rack (0.9.1)
rack-cache (0.5)
rake (0.8.7)
rakegen (0.6.6)
RedCloth (4.2.2)
waves (0.8.2)

ちなみに
ruby 1.8.7
gem 1.3.4
です。

↓ランキング参加中!ポチッとお願いします。
ブログランキング・にほんブログ村へ人気ブログランキングへ

2009年7月2日木曜日

sakura にruby waves をインストール3

さてさて今日も前回の続きでエラー調査。。。

新しいRackがすでに読み込まれているにもかかわらず、
古いRackを使おうとしてエラーになっているっぽい。
と、どこかのだれかのコメントをみつけたので、古いRackを削除。

%gem uninstall rack --version 0.9.1

You have requested to uninstall the gem:
rack-0.9.1
rack-cache-0.5 depends on [rack (>= 0.4)]
waves-0.8.2 depends on [rack (~> 0.4)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] y
Successfully uninstalled rack-0.9.1


んでもって再度「waves」

%waves
/home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:826:in `report_activate_error': RubyGem version error: rack(1.0.0 not ~> 0.4) (Gem::LoadError)
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:260:in `activate'
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:295:in `activate'
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:294:in `each'
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:294:in `activate'
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:67:in `gem'
from //home/xxxxx/lib/ruby/gem/bin/waves:18


あら?1.0.0がダメなのか?
って事でrackを0.9.1にして

%waves
/home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- metaid (LoadError)
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/xxxxx/lib/ruby/gem/gems/waves-0.8.2/bin/../lib/waves.rb:9
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/xxxxx/lib/ruby/gem/gems/waves-0.8.2/bin/waves:22
from //home/xxxxx/lib/ruby/gem/bin/waves:19:in `load'
from //home/xxxxx/lib/ruby/gem/bin/waves:19

おや?これはmetaidってのがロードされてないって事?

%gem install --remote metaid
Successfully installed metaid-1.0
1 gem installed
Installing ri documentation for metaid-1.0...
Installing RDoc documentation for metaid-1.0...

これでOKかな?

%waves
/home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- english/style (LoadError)
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/xxxxx/lib/ruby/gem/gems/waves-0.8.2/bin/../lib/waves.rb:18
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/xxxxx/lib/ruby/gem/gems/waves-0.8.2/bin/waves:22
from //home/xxxxx/lib/ruby/gem/bin/waves:19:in `load'
from //home/xxxxx/lib/ruby/gem/bin/waves:19

またロードエラー。。。全然waves関連インストールされてないっぽいなw

↓ランキング参加中!ポチッとお願いします。
ブログランキング・にほんブログ村へ人気ブログランキングへ