2009年7月3日金曜日

Waves チュートリアル Classic

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

まずはblogというアプリを作成。
  1. %waves generate --name=blog --orm=sequel  
  2. ** Waves 0.8.2 **  
  3. ** Creating new Waves application ...  

で、blogディレクトリができてるので、blogディレクトリ内でwaves実行
  1. %cd blog/  
  2. %waves server  
  3. ** Waves 0.8.2 **  
  4. no such file to load -- markaby  

あら?markabyってのインストール?
  1. %gem install markaby  
  2. Successfully installed builder-2.1.2  
  3. Successfully installed markaby-0.5  
  4. 2 gems installed  

これでOKかな?
  1. %waves server  
  2. ** Waves 0.8.2 **  
  3. Could not find RubyGem sequel (>= 2.0.0)  

今度はsequelか。。。
  1. %gem install sequel  
  2. Successfully installed sequel-3.2.0  
  3. 1 gem installed  

これでOKか?
  1. %waves server  
  2. ** Waves 0.8.2 **  
  3. I, [2009-07-03 18:58:10 #22553]  INFO -- : Logger started.  
  4. I, [2009-07-03 18:58:10 #22553]  INFO -- : Waves::Server starting ...  
  5. I, [2009-07-03 18:58:11 #22553]  INFO -- : ruby-debug enabled  
  6. I, [2009-07-03 18:58:12 #22553]  INFO -- : Mongrel started on 127.0.0.1:3000.  

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

Waves チュートリアル CompactApps

英語で書かれててよくわからないけど、チュートリアルをやってみる。
CompactとClassicがあるみたいで、今回はCompactをやってみようと思います。
ちなみにClassicだとMVC形式のファイルがいろいろできるみたいです。
  1. %waves generate --name=spit_ball --template=compact  
  2. ** Waves 0.8.2 **  
  3. ** Creating new Waves application ...  
  4. ** Application created!  

これでspit_ballというディレクトリができました。
その中を見てみるとstartup.rbというファイルがあるだけ。。コンパクトですw
内容は↓
  1. require 'foundations/compact'  
  2.   
  3. module SpitBall  
  4.   include Waves::Foundations::Compact  
  5. end  

とりあえず実行してみよう♪
  1. %waves server  
  2. ** Waves 0.8.2 **  
  3. I, [2009-07-03 16:48:02 #10441]  INFO -- : Logger started.  
  4. I, [2009-07-03 16:48:02 #10441]  INFO -- : Waves::Server starting ...  
  5. no such file to load -- ruby-debug  

あら?ruby-debugをインストール?
  1. %waves server  
  2. ** Waves 0.8.2 **  
  3. I, [2009-07-03 16:48:02 #10441]  INFO -- : Logger started.  
  4. I, [2009-07-03 16:48:02 #10441]  INFO -- : Waves::Server starting ...  
  5. no such file to load -- ruby-debug  
  6. %gem install ruby-debug  
  7. Building native extensions.  This could take a while...  
  8. Building native extensions.  This could take a while...  
  9. Successfully installed columnize-0.3.0  
  10. Successfully installed linecache-0.43  
  11. Successfully installed ruby-debug-base-0.10.3  
  12. Successfully installed ruby-debug-0.10.3  
  13. 4 gems installed  
  14. Installing ri documentation for columnize-0.3.0...  
  15. Installing ri documentation for linecache-0.43...  
  16. Installing ri documentation for ruby-debug-base-0.10.3...  
  17. Installing ri documentation for ruby-debug-0.10.3...  
  18. Installing RDoc documentation for columnize-0.3.0...  
  19. Installing RDoc documentation for linecache-0.43...  
  20. Installing RDoc documentation for ruby-debug-base-0.10.3...  
  21. Installing RDoc documentation for ruby-debug-0.10.3...  

これでいいのかな?
  1. %waves server  
  2. ** Waves 0.8.2 **  
  3. I, [2009-07-03 17:27:21 #14447]  INFO -- : Logger started.  
  4. I, [2009-07-03 17:27:21 #14447]  INFO -- : Waves::Server starting ...  
  5. I, [2009-07-03 17:27:22 #14447]  INFO -- : ruby-debug enabled  
  6. no such file to load -- mongrel  

次はmongrelか。。。
  1. %gem install mongrel  

と、先程と同じようにインストール◎
で再度実行!
  1. %waves server  
  2. ** Waves 0.8.2 **  
  3. I, [2009-07-03 17:28:52 #14567]  INFO -- : Logger started.  
  4. I, [2009-07-03 17:28:52 #14567]  INFO -- : Waves::Server starting ...  
  5. I, [2009-07-03 17:28:53 #14567]  INFO -- : ruby-debug enabled  
  6. 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だったので、
  1. %gem install english --version 0.3.1  
  2. Successfully installed english-0.3.1  
  3. 1 gem installed  
  4. Installing ri documentation for english-0.3.1...  
  5. Installing RDoc documentation for english-0.3.1...  

で、最初にインストールされた0.4.0を削除
  1. %gem uninstall english --version 0.4.0  
  2. Successfully uninstalled english-0.4.0   

で、「waves」。。。
  1. %waves   
  2. ** Waves 0.8.2 **  
  3. Usage: waves [ generate | server | console ] [ options ]  
  4. Run a waves command with the given options. Use --help with any command to learn  
  5. more about that command. EXAMPLE: waves generate --help  

お、できた♪
何か新しいバージョンにまだ対応してない?って感じでしょうか?
まぁできたからこれでOKってことで◎
結果gemの中はこんな感じになりました↓
  1. %gem list  
  2.   
  3. *** LOCAL GEMS ***  
  4.   
  5. abstract (1.0.0)  
  6. autocode (1.0.0)  
  7. choice (0.1.3)  
  8. daemons (1.0.10)  
  9. english (0.3.1)  
  10. erubis (2.6.4)  
  11. extensions (0.6.0)  
  12. filebase (0.3.6)  
  13. functor (0.5.1)  
  14. highline (1.5.1)  
  15. live_console (0.2.1)  
  16. metaid (1.0)  
  17. rack (0.9.1)  
  18. rack-cache (0.5)  
  19. rake (0.8.7)  
  20. rakegen (0.6.6)  
  21. RedCloth (4.2.2)  
  22. waves (0.8.2)  

ちなみに
ruby 1.8.7
gem 1.3.4
です。

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

2009年7月2日木曜日

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

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

新しいRackがすでに読み込まれているにもかかわらず、
古いRackを使おうとしてエラーになっているっぽい。
と、どこかのだれかのコメントをみつけたので、古いRackを削除。
  1. %gem uninstall rack --version 0.9.1  
  2.   
  3. You have requested to uninstall the gem:  
  4.         rack-0.9.1  
  5. rack-cache-0.5 depends on [rack (>= 0.4)]  
  6. waves-0.8.2 depends on [rack (~> 0.4)]  
  7. If you remove this gems, one or more dependencies will not be met.  
  8. Continue with Uninstall? [Yn]  y  
  9. Successfully uninstalled rack-0.9.1  


んでもって再度「waves」
  1. %waves  
  2. /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)  
  3.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:260:in `activate'  
  4.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:295:in `activate'  
  5.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:294:in `each'  
  6.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:294:in `activate'  
  7.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems.rb:67:in `gem'  
  8.         from //home/xxxxx/lib/ruby/gem/bin/waves:18  


あら?1.0.0がダメなのか?
って事でrackを0.9.1にして
  1. %waves  
  2. /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)  
  3.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'  
  4.         from /home/xxxxx/lib/ruby/gem/gems/waves-0.8.2/bin/../lib/waves.rb:9  
  5.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'  
  6.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'  
  7.         from /home/xxxxx/lib/ruby/gem/gems/waves-0.8.2/bin/waves:22  
  8.         from //home/xxxxx/lib/ruby/gem/bin/waves:19:in `load'  
  9.         from //home/xxxxx/lib/ruby/gem/bin/waves:19  

おや?これはmetaidってのがロードされてないって事?
  1. %gem install --remote metaid  
  2. Successfully installed metaid-1.0  
  3. 1 gem installed  
  4. Installing ri documentation for metaid-1.0...  
  5. Installing RDoc documentation for metaid-1.0...  

これでOKかな?
  1. %waves  
  2. /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)  
  3.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'  
  4.         from /home/xxxxx/lib/ruby/gem/gems/waves-0.8.2/bin/../lib/waves.rb:18  
  5.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'  
  6.         from /home/xxxxx/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'  
  7.         from /home/xxxxx/lib/ruby/gem/gems/waves-0.8.2/bin/waves:22  
  8.         from //home/xxxxx/lib/ruby/gem/bin/waves:19:in `load'  
  9.         from //home/xxxxx/lib/ruby/gem/bin/waves:19  

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

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