Saturday, March 28, 2009

Chapter 50: Merb Course #1

  1. Day 1: First 7 pages were fun. Done with them.
  2. Did "gem -v" and correctly got: 1.3.1 (p.16)
  3. Did "gem server" and open browser at http://localhost:8808 and it worked. (p.17)
  4. Downloading do_sqlite3 as follows: $ gem list --local |grep sql
    mysql (2.7.3)
    sqlite3-ruby (1.2.3, 1.2.1)
    $ cd c:
    $ cd temp
    $ lf
    do_sqlite3-0.9.11-x86-mswin32-60.gem
    $ gem install do_*
    Successfully installed addressable-2.0.2
    Successfully installed extlib-0.9.10
    Successfully installed data_objects-0.9.11
    Successfully installed do_sqlite3-0.9.11-x86-mswin32-60
    4 gems installed
    Installing ri documentation for addressable-2.0.2...
    Installing ri documentation for data_objects-0.9.11...
    Installing RDoc documentation for addressable-2.0.2...
    Installing RDoc documentation for data_objects-0.9.11...
  5. Now installing merb: After a long delay got this: $ gem install merb
    **************************************************
    Thank you for installing rspec-1.2.2
    Please be sure to read History.rdoc and Upgrade.rdoc
    for useful information about this release.
    **************************************************
    Building native extensions. This could take a while...
    ERROR: Error installing merb:
    ERROR: Failed to build gem native extension.
    c:/deepdive/InstantRails-2.0-win/ruby/bin/ruby.exe extconf.rb install merb
    creating Makefile
    nmake
    'nmake' is not recognized as an internal or external command,
    operable program or batch file.
    Gem files will remain installed in c:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby
    /gems/bcrypt-ruby-2.0.5 for inspection.
    Results logged to c:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/bcrypt-ruby
    -2.0.5/ext/gem_make.out
  6. Ignore the merb install errors for the moment. Did next thing I think: $ gem install dm-core (p.17)
    Successfully installed dm-core-0.9.10
    1 gem installed
    Installing ri documentation for dm-core-0.9.10...
    Installing RDoc documentation for dm-core-0.9.10...
  7. Then this: $ gem install dm-aggregates 9p.17)
    Successfully installed dm-aggregates-0.9.10
    1 gem installed
    Installing ri documentation for dm-aggregates-0.9.10...
    Installing RDoc documentation for dm-aggregates-0.9.10...
  8. Then this: $ gem install dm-migrations (p.17)
    Successfully installed dm-migrations-0.9.10
    1 gem installed
    Installing ri documentation for dm-migrations-0.9.10...
    Installing RDoc documentation for dm-migrations-0.9.10...
  9. Then this: $ gem install dm-timestamps (p.17)
    Successfully installed dm-timestamps-0.9.10
    1 gem installed
    Installing ri documentation for dm-timestamps-0.9.10...
    Installing RDoc documentation for dm-timestamps-0.9.10...
  10. Then this: $ gem install dm-types (p.17)
    Building native extensions. This could take a while...
    ERROR: Error installing dm-types:
    ERROR: Failed to build gem native extension.
    c:/deepdive/InstantRails-2.0-win/ruby/bin/ruby.exe extconf.rb install dm-types
    creating Makefile
    nmake
    'nmake' is not recognized as an internal or external command,
    operable program or batch file.
    Gem files will remain installed in c:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby
    /gems/bcrypt-ruby-2.0.5 for inspection.
    Results logged to c:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/bcrypt-ruby
    -2.0.5/ext/gem_make.out
  11. Then this: $ gem install dm-validations (p.17)
    Successfully installed dm-validations-0.9.10
    1 gem installed
    Installing ri documentation for dm-validations-0.9.10...
    Installing RDoc documentation for dm-validations-0.9.10...
  12. "Finally" this: $ gem install dm-serializer (p.17)
    Successfully installed dm-serializer-0.9.10
    1 gem installed
    Installing ri documentation for dm-serializer-0.9.10...
    Installing RDoc documentation for dm-serializer-0.9.10...
    Could not find main page README.txt
    Could not find main page README.txt
    Could not find main page README.txt
    Could not find main page README.txt
  13. Here is a google thread on dm-types/merb install problem. (p.17) http://groups.google.com/group/merb/browse_thread/thread/d0bc635005305de8
  14. Did a "gem fetch dm-types" and it worked.
  15. Did a "gem unpack dm-types" and it worked.
  16. Did a $ find . -exec grep -il crypt {} \;
    ./History.txt
    ./lib/dm-types/bcrypt_hash.rb
    ./lib/dm-types.rb
    ./Manifest.txt
    ./Rakefile
    ./spec/integration/bcrypt_hash_spec.rb
    ./spec/unit/bcrypt_hash_spec.rb
    [/cygdrive/c/...dm-types-0.9.10] $
  17. Print out this web page: http://www.ghostonthird.com/2007/11/17/merb-on-windows-it-works/
  18. The dependencey was removed from github on March 23, 2009: http://github.com/datamapper/dm-more/commit/d37f392ce69e5bfbc71b0aa8abade5dd22c00c63
  19. Trying to debug "dm-types" (merb) install problem so I repeated Dan's steps: $ gem fetch merb (p.17)
    Downloaded merb-1.0.10
  20. Then unpacked it $ gem unpack merb-1.0.10.gem
    Unpacked gem: 'c:/Documents and Settings/jasnow/gitlocalrepo/merb-1.0.10'
  21. Then created gemspec file: $ gem spec merb -v '1.0.10' -r > merb-1.0.10.gemspec and it had 173 lines in it.
  22. Then edited the previous step's gemspec file. Changed "0.9.10" to "0.9.9". !ruby/object:Gem::Dependency
    name: dm-types
    type: :runtime
    version_requirement:
    version_requirements: !ruby/object:Gem::Requirement
    requirements:
    - - ~>
    - !ruby/object:Gem::Version
    version: 0.9.9
    version:
  23. Then built gemspec file. $ gem build -V merb-1.0.10.gemspec
    WARNING: RDoc will not be generated (has_rdoc == false)
    Successfully built RubyGem
    Name: merb
    Version: 1.0.10
    File: merb-1.0.10.gem
  24. Still a problem.
  25. Did this: git clone git://github.com/datamapper/dm-more.git
  26. Ran "rake gem" and it worked and put gem into pkg directory.
  27. Tried this: $ gem install dm-more-0.9.11.gem
    ERROR: Error installing dm-more-0.9.11.gem:
    dm-more requires dm-core (= 0.9.11, runtime)
  28. So I got dm-core: git clone git://github.com/datamapper/dm-core.git
  29. Repeated step 26 and 27, but it need data-objects. Getting old...
  30. So I got data-objects: git clone git://github.com/sam/do.git(OUT OF DATE)
  31. So I did this one: git clone git://github.com/datamapper/data_mapper.git
  32. Repeated step 26 and 27. Got same message as step 27 about dm-core.
  33. Started using Dan's instructions. Repeated step 19. It worked. $ gem fetch merb
    Downloaded merb-1.0.10
  34. Repeated step 20: $ gem unpack merb-1.0.10.gem
    Unpacked gem: 'c:/Documents and Settings/jasnow/gitlocalrepo/merb-1.0.10'
  35. Repeated step 21: $ gem spec merb -v '1.0.10' -r > merb-1.0.10.gemspec
  36. Repeated step 22: Change 1 (s/0.9.10/0.9.9/) line in new merb-1.0.10.gemspec file.
  37. Repeated step 23: $ gem build -V merb-1.0.10.gemspec
    WARNING: RDoc will not be generated (has_rdoc == false)
    Successfully built RubyGem
    Name: merb
    Version: 1.0.10
    File: merb-1.0.10.gem
  38. NEW STUFF: Ran this: $ gem install dm-validations
    Successfully installed dm-validations-0.9.10
    1 gem installed
    Installing ri documentation for dm-validations-0.9.10...
    Installing RDoc documentation for dm-validations-0.9.10...
  39. Ran this: $ gem install dm-sweatshop
    Successfully installed randexp-0.1.4
    Successfully installed dm-sweatshop-0.9.10
    2 gems installed
    Installing ri documentation for randexp-0.1.4...
    Installing ri documentation for dm-sweatshop-0.9.10...
    Installing RDoc documentation for randexp-0.1.4...
    Installing RDoc documentation for dm-sweatshop-0.9.10...
    Could not find main page README.txt
    Could not find main page README.txt
    Could not find main page README.txt
    Could not find main page README.txt
  40. Ran this: $ gem install dm-serializer
    Successfully installed dm-serializer-0.9.10
    1 gem installed
    Installing ri documentation for dm-serializer-0.9.10...
    Installing RDoc documentation for dm-serializer-0.9.10...

    Could not find main page README.txt
    Could not find main page README.txt
    Could not find main page README.txt
    Could not find main page README.txt
  41. Ran this: $ gem install dm-aggregates
    Successfully installed dm-aggregates-0.9.10
    1 gem installed
    Installing ri documentation for dm-aggregates-0.9.10...
    Installing RDoc documentation for dm-aggregates-0.9.10...
  42. MAGIC KEY: Ran this: $ gem install dm-types --version '= 0.9.9'
    Successfully installed dm-types-0.9.9
    1 gem installed
    Installing ri documentation for dm-types-0.9.9...
    Installing RDoc documentation for dm-types-0.9.9...
  43. FINALLY Ran this: $ gem install --local merb-1.0.10.gem
    Successfully installed merb-1.0.10
    1 gem installed
  44. Ran this; $ gem install webrat
    Successfully installed nokogiri-1.2.3-x86-mswin32-60
    Successfully installed webrat-0.4.3
    2 gems installed
    Installing ri documentation for nokogiri-1.2.3-x86-mswin32-60...
    Installing ri documentation for webrat-0.4.3...
    Installing RDoc documentation for nokogiri-1.2.3-x86-mswin32-60...
    Installing RDoc documentation for webrat-0.4.3...
  45. Ran this: $ gem list -- See results at http://www.pastie.org/430974
  46. Ran this: $ gem spec merb -- See results at http://www.pastie.org/430978
  47. Ran this: $ gem dependency merb -- See results at http://www.pastie.org/430979
  48. Ran this: $ gem install mongrel
    Successfully installed mongrel-1.1.5-x86-mswin32-60
    1 gem installed
    Installing ri documentation for mongrel-1.1.5-x86-mswin32-60...
    Installing RDoc documentation for mongrel-1.1.5-x86-mswin32-60...
  49. Ran this: $ gem spec mongrel -- See results at http://www.pastie.org/430984
  50. Install 3 sqlite files on page 20. (done)
  51. Now a problem seeting $PATH.

3 comments: