tag:blogger.com,1999:blog-4536749082861792122024-02-19T22:02:44.156-08:00My-Ruby-JourneyAnonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.comBlogger66125tag:blogger.com,1999:blog-453674908286179212.post-91290742614926206522010-03-12T09:05:00.000-08:002010-03-12T09:12:34.063-08:00Chapter 60: Is Watir Project ready for Google Summer of Code?Here are my suggested Google Summer of Code<a href="http://groups.google.com/group/selenium-developers/browse_thread/thread/a80b5dd1610a8ca4?hl=en&pli=1"> project ideas</a>.<br /><br /><b>Should we propose them?</b><br /><br />Yes, I know this is last minute. We have until 6pm EST today (3/12/2010).<br /><br />Expect the first to be part of the<a href="http://wiki.openqa.org/display/SEL/2010+Google+Summer+of+Code"> Selenium project page</a><br />and the second one to be on a Watir project page.<br /><br />######################################################<br /><br /><span style="font-size:130%;"><b>Safari Driver/Target for ruby-based selenium-webdriver</b></span><br />---------------------------------------------------------------------------<br /><br /><span style="font-weight: bold;">Summary</span><br />Create safari browser driver (:safari) for the ruby-based<br />selenium-webdriver gem to be uses with watir-webdriver.<br /><br /><span style="font-weight: bold;">Tags</span><br />Se2, webdriver, watir, watirspec, watir-webdriver<br /><br /><span style="font-weight: bold;">Status</span><br />Draft<br /><br /><span style="font-weight: bold;">Mentor</span><br />TBD (technical)<br />Al Snow (general/watir community contact)<br /><br /><span style="font-weight: bold;">Description</span><br />The current selenium-webdriver does not support the safari<br />browser. Previous research suggests that the :remote<br />target, code within the safariwatir tool, backseat in github,<br />and firedriver in github may jump start this development.<br /><br />The overall goal is to use this in connection with watir-webdriver<br />and run it against watirspec (similar to rubyspec).<br /><br /><span style="font-weight: bold;">Background:</span><br /><a href="http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html">http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html</a><br /><br />=============================================================<br /><br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Finish watirspec (clean run) against watir-webdriver</span></span><br />----------------------------------------------------------------------<br /><br /><span style="font-weight: bold;">Summary</span><br />Get watir-webdriver to run all of the watirspec specs cleanly.<br />Possible targets include :ie, :ff, and :chrome.<br /><br /><span style="font-weight: bold;">Tags</span><br />watir, webdriver, watir-webdriver<br /><br /><span style="font-weight: bold;">Status</span><br />Draft<br /><br /><span style="font-weight: bold;">Mentor</span><br />TBD (technical)<br />Al Snow (general/watir community contact)<br /><br /><span style="font-weight: bold;">Description</span><br />Watirspec is a set of ruby-based specs that<br />specify how watir-webdriver should work.<br /><br />===================================================================<br /><span style="font-size:180%;"><span style="font-weight: bold;">TODO's:</span></span><br /><br /><span style="font-weight: bold;">Twitter:</span> @safariwatir, @watir<br /><span style="font-weight: bold;">IRC: </span>#watir<br /><br /><span style="font-weight: bold;">E-groups:</span><br />wtr-development@rubyforge.org<br />watir-general@googlegroups.com<br />webdriver@googlegroups.com<br />selenium-developers@googlegroups.com<br /><br /><span style="font-weight: bold;">Three main developers: </span><br />Jari Bakken (watir-webdriver, @jarib),<br />Simon Stewart (selenium-webdriver, @shs96c),<br />Tom Copeland (@safariwatir)<br /><a href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_2" target="_blank"><br /></a>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-30100435214639685502010-02-28T10:51:00.000-08:002010-03-01T17:16:22.265-08:00Chapter 59: Creating Ruby-based Safari Driver for Selenium-webdriver<span style="font-size: 180%;"><span style="font-weight: bold;">My Letter to the Watir/Selenium Communities:</span></span><br />
<br />
Everyone,<br />
For the past several weeks, I have been working with the new version<br />
of Watir (watir-webdriver). I have documented my journey on <a href="http://sites.google.com/site/watironopensolaris/Home/webdriver-related-work" target="_blank">my wiki</a><br />
and one of <a href="http://my-ruby-journey.blogspot.com/" target="_blank">my blogs</a> (Chapters 51-58, see last one for current summary).<br />
<br />
Now it is time to check in and verify what other people have been doing<br />
in this area (especially with the<b><span style="color: red;"> safari driver </span></b>for watir-webdriver) and<br />
see if other people would like to help to create a "branch" (fork)<br />
for this work.<br />
<br />
I will update my blog with the responses and post to<br />
the wtr-development and webdriver e-groups.<br />
<br />
Thanks in advance,<br />
Al Snow<br />
Linkedin: http://www.linkedin.com/in/alsnow<br />
Google Talk: jasnow1<br />
Twitter: jasnow<br />
<br />
PS. Remember to include :<br />
Twitter: @safariwatir<br />
IRC: #watir<br />
E-groups:<br />
wtr-development@rubyforge.org<br />
watir-general@googlegroups.com<br />
webdriver@googlegroups.com<br />
selenium-developers@googlegroups.com<br />
Three main developers: Jari, Simon, Tom<br />
<br />
<div style="color: red;"><span style="font-size: x-large;">Here is where I will post the <a href="http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html">responses/reactions. </a></span></div><did></did>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-64314081729256237072010-02-26T08:20:00.000-08:002010-03-03T17:25:08.860-08:00Chapter 58: Creating Ruby-based Safari Driver for Selenium-webdriver<b style="color: red;"></b><span style="font-size:130%;"><b style="color: red;">GOAL: Get experience with ruby-related, Watir-related technologies. Do no harm.</b><br /></span><ul><li><span style="font-size:130%;">Listen to<a href="http://watirpodcast.com/31-jari-bakken-and-simon-stewart-on-watir-2-0-selenium-and-webdriver-celerity-and-htmlunit/" rel="nofollow" target="_blank"> watir podcast (#31/Jari Bakken+Simon Stewart). (35 minutes)</a> (2/26/2010: done)</span></li><li><span style="font-size:130%;">Listen to <a href="http://watirpodcast.com/25-dave-hoover-on-safariwatir-and-software-craftsmanship/" rel="nofollow">safariwatir watir podcast (#25/Dave Hoover)</a> (2/26/2010: done/50 minutes)<br /></span></li><li><span style="font-size:130%;">Listen to <a href="http://watirpodcast.com/28-tom-copeland-on-safariwatir/" rel="nofollow">(#28/Tom Copeland) </a>(2/26/2010: done)</span></li><li><span style="font-size:130%;">Read<a href="http://google-opensource.blogspot.com/2009/05/introducing-webdriver.html" target="_blank"> introducing-webdriver blog</a>. (2/26/2010: done)<br /></span></li><li><span style="font-size:130%;">Re-read<a href="http://my-ruby-journey.blogspot.com/" target="_blank"> chapters 51-56+</a> of my blog. (2/26/2010: done)</span></li><li><span style="font-size:130%;">Decide if I care about safari driver on PC (or just MAC, IPhone, IPad).<br />(2/26/2010: Decide that the stub can run on PC and MAC platforms)</span></li><li><span style="font-size:130%;">Research safariwatir. (2/26/2010: done/Found most of the interesting<br />emails/blogs/postings; <a href="http://wiki.openqa.org/display/WTR/SafariWatir" rel="nofollow">safariwatir on openqa (overall page))</a></span></li><li><span style="font-size:130%;">selenium-webdriver is located at:<a href="http://github.com/shs96c/webdriver" rel="nofollow"> http://github.com/shs96c/webdriver</a></span></li><li><span style="font-size:130%;">Set up Eclipse, Netbeans, or RubyMine as IDE. (2/26/2010: Installed<br />Eclipse on PC, configured for Ruby, build selenium-webdriver project)</span></li><li><span style="font-size:130%;">GOAL: Clone (fork) selenium-webdriver and add safari driver stub code.</span></li><li><span style="font-size:130%;">Use this ruby/watir script as my first test case. My<a href="http://my-ruby-journey.blogspot.com/2010/02/chapter-56-watir-webdriver-journey.html" target="_blank"> past work documented here.</a><br /></span></li></ul><div style="text-align: left; margin-left: 80px;"><span style="font-size:130%;">require "watir-webdriver"<br />browser = Watir::Browser.new(:safari)<br />sleep 2<br />browser.close</span></div><ul><li><span style="font-size:130%;">FYI: My previous research appears that "safari" driver work completely<br />be isolated inside <b>selenium-webdriver</b>.</span></li><li><span style="font-size:130%;">2/26/2010: Set WATIR_WEBDRIVER_BROWSER to "safari" and<br />use ":safari", I saw "</span><span style=";font-size:130%;color:red;" >unknown driver</span><span style="font-size:130%;">" message with a stub.<br /></span></li><li><span style="font-size:130%;">2/26/2010: Added two line to driver.rb file and rerun test file.<br /></span></li><li><span style="font-size:130%;">2/26/2010: NOTE: "jobbie" directory is IE code.</span></li><li><span style="font-size:130%;">2/26/2010: Got stuck on no gemspec for selenium-webdriver so stop for now.</span></li><li><span style="font-size:130%;">Installed jeweler (1.2.1): </span><span style="font-weight: bold;font-size:130%;" >gem install technicalpickles-jeweler</span></li><li><span style="font-size:130%;">2/27/2010: After sleeping on it and finding that the selenium-webdriver is<br />probably embedded deep inside selenium, I have decided to decide on this tomorrow.</span></li><li><span style="font-size:130%;">2/28/2010: Deciding on how to trim this Yak (add ruby-based safari-driver to<br />selenium-webdriver running under watir-webdriver).</span></li><li><span style="font-size:130%;">2/28/2010: Decided to write an email to inform people, e-groups, IRC,<br />twitter of my work. Ask for past work and help, then decide course.<br /></span></li></ul><ul><ul><li><span style="font-size:130%;">Assume everyone follows one of the appropriate e-groups.</span></li><li><span style="font-size:130%;">Will use webdriver@googlegroups.com and selenium-dev lists.<br />Also the wtr-development@rubyforge.org list (on Rubyforge IIRC).<br />Then watir-general@googlegroups.com. </span><span style="font-weight: bold;font-size:130%;color:red;" > </span><span style="font-weight: bold;font-size:130%;color:red;" >(only once)</span><span style="font-size:130%;"><br /></span></li><li><span style="font-size:130%;">Maybe use IRC (freenode) with #watir.</span></li><li><span style="font-size:130%;">Also @safariwatir on twitter.<br /></span></li><li><span style="font-size:130%;">Contact people involved:</span></li><ul><li><span style="font-weight: bold;font-size:130%;" >Jari Bakken</span><span style="font-size:130%;"> (watir-webdriver) -- jarib/watir-webdriver on github<br /></span></li><li><span style="font-weight: bold;font-size:130%;" >Simon Stewart</span><span style="font-size:130%;"> (selenium-webdriver) (0.0.17)</span></li><ul><li><span style="font-size:130%;">Sai (Thoughworker) - was:<br /></span></li><li><span style="font-size:130%;">Contact Sai, Prashant@Sun/Oracle.</span></li></ul><li><span style="font-weight: bold;font-size:130%;" >Dave Hoove</span><span style="font-size:130%;">r (original safariwatir author) - more in section 6.20 of my notebook.</span></li><li><span style="font-weight: bold;font-size:130%;" >Tom Copeland</span><span style="font-size:130%;"> (lead safariwatir developer) (0.3.37) (NOTE: Work with Tom<br />if we decide (probably use submodule) to merge safariwatir as safari driver guts.</span></li></ul></ul></ul><span style="font-size:130%;"><br /></span><span style="font-size:130%;"><b>RESPONSE TO EMAIL in Blog Post #59: </b><br /></span><div dir="ltr"><ol><li><span style="font-size:130%;">Doing research on how to add software to existing open source projects. Wow,<br />this is the only thing I found where google-ing.</span><span style="font-size:130%;"><a href="http://catb.org/esr/writings/taoup/html/ch19s02.html" rel="nofollow"><span style="font-weight: bold;"> </span></a><a href="http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html" target="_blank"><br />http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html</a><br />Best Practices for Working with Open-Source Developers.</span><span style=";font-family:Calibri,Verdana,Helvetica,Arial;font-size:130%;" >\</span></li><li><span style=";font-family:Calibri,Verdana,Helvetica,Arial;font-size:130%;" >Received one new follower of my blog.</span></li><li><span style=";font-family:Calibri,Verdana,Helvetica,Arial;font-size:130%;" >My own thoughts: </span></li><ul><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" ><a href="http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html" target="_blank">Blog #58</a></span><span style="font-size:130%;"><a href="http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html"> Creating Ruby-based Safari Driver for Selenium-webdriver</a></span><span style=";font-family:Times New Roman,serif;font-size:130%;" ><br /></span></li><li style="line-height: normal;"><span style="font-size:130%;">GOAL: Clone (fork) selenium-webdriver and add safari driver stub code.</span></li><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Look into how Simon creates the current selenium-webdriver to avoid forking the code.</span></li><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >If I must fork the code, use selenium-webdriver gem code (put in Git as<br />selenium-webdriver-ruby) since it is easier, then back-port it later.</span></li><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Copy the code for one of the existing drivers and rename it to ":safari" initially.</span></li><ul><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Probably set up submodule for safariwatir code if I/we use it.</span> </li><li style="line-height: normal;"><span style="font-size:130%;">Webdriver thread about selenium-webdriver: <a href="http://www.blogger.com/Webdriver%20thread%20about%20selenium-webdriver:%20http://groups.google.com/group/webdriver/browse_thread/thread/df6d285d05f87cf5/939f96ccba24027f#939f96ccba24027f"><br />http://groups.google.com/group/webdriver/browse_thread/thread/df6d285d05f87cf5/939f96ccba24027f#939f96ccba24027f</a></span></li><li style="line-height: normal;"><span style="font-size:130%;">Also look at the "native safari webdriver plugin".</span><table cellpadding="0" cellspacing="0"><tbody><tr><td><span style="font-size:130%;"> From Miklos on </span></td><td><span style="font-size:130%;">webdriver@googlegroups.com e-group, I got the following: </span></td></tr></tbody></table><pre><span style="font-size:130%;">Please note that webdriver has a safari branch were the native safari<br />webdriver plugin development is ongoing:<br /><a href="http://code.google.com/p/selenium/source/browse/#svn/branches/safari" target="_blank">http://code.google.com/p/selenium/source/browse/#svn/branches/safari</a></span></pre></li></ul></ul></ol><ol><ul><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Try to get local help at local Ruby Study Group, global Watir/Selenium<br />community, and/or create local help group. Apply to GSOC as a mentor.</span></li><li style="line-height: normal;"><span style="font-size:130%;">Also found that: </span><span style=";font-family:Calibri,Verdana,Helvetica,Arial;font-size:130%;" >Google Summer of Code 2010 is on! We will begin accepting<br />applications from mentoring organizations on March 8th <a href="http://socghop.appspot.com/" target="_blank">http://socghop.appspot.com</a></span></li><li style="line-height: normal;"><span style="font-size:130%;">Local Ruby User Group Information</span><ul><li><span style="font-size:130%;"> 2/28/2010: Sent him suggestion for next </span><span style=";font-family:";font-size:130%;" >Emerald City Programming<br />Group meeting; responded that Cucumber was the topic next Sat.)</span></li><li><span style=";font-family:Symbol;font-size:130%;" ><span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:Times New Roman;" >Emails: </span></span><span style="font-size:130%;"><a href="mailto:ruby-83@meetup.com"><b>ruby-83@meetup.com</b></a><b> , </b><a href="mailto:ruby-83-announce@meetup.com">ruby-83-announce@meetup.com</a></span></li><li><span style="font-size:130%;">IRC:</span><span style="font-size:130%;"> #atlrug on webchat.freenode.net/ (2/28/2010: Logged in; Also<br />checked out #watir and #selenium IRC channels.)</span></li></ul></li><li style="line-height: normal;"><span style="font-size:130%;">Also: <a href="http://github.com/jim/backseat" rel="nofollow">http://github.com/jim/backseat</a></span><br /><div style="margin-left: 0.25in;"><span style="font-size:130%;">Steer WebDriver from Ruby — <a href="http://autonomousmachine.com/2008/10/17/steer-webdriver-from-ruby-with-backseat" rel="nofollow"><br />http://autonomousmachine.com/2008/10/17/steer-webdriver-from-ruby-with-backseat</a></span></div><pre style="margin-left: 0.25in;font-family:times new roman,serif;"><span style="font-size:130%;">Backseat is a proof of concept that uses Rjb to directly interact with the<br />WebDriver Java classes. I'm still thinking about the API, so no specs just yet.</span></pre><pre style="margin-left: 0.25in;font-family:times new roman,serif;"><span style="font-size:130%;">EXAMPLES:</span></pre><pre style="margin-left: 0.25in;font-family:times new roman,serif;"><span style="font-size:130%;"> Please see firefox_example.rb and htmlunit_example.rb in the examples<br />directory for implementations of the 2 official WebDriver examples from <a href="http://code.google.com/p/webdriver/wiki/GettingStarted"><br />http://code.google.com/p/webdriver/wiki/GettingStarted</a>.</span></pre><pre style="margin-left: 0.25in;font-family:times new roman,serif;"><span style="font-size:130%;">REQUIREMENTS:</span></pre><pre style="margin-left: 0.25in;font-family:times new roman,serif;"><span style="font-size:130%;"> a working JVM- you may need to set your LD_LIBRARY_PATH <a href="http://rjb.rubyforge.org/" rel="nofollow"><br />http://rjb.rubyforge.org/</a></span></pre><pre style="margin-left: 0.25in;font-family:times new roman,serif;"><span style="font-size:130%;"> rjb - sudo gem install rjb, if you're on a Mac go here: </span></pre><pre style="margin-left: 0.25in;font-family:times new roman,serif;"><span style="font-size:130%;"> <a href="http://www.digitalsanctum.com/2008/02/02/gem-install-rjb-on-mac-os-x-leopard/" rel="nofollow">http://www.digitalsanctum.com/2008/02/02/gem-install-rjb-on-mac-os-x-leopard/</a></span></pre><pre style="margin-left: 0.25in;font-family:times new roman,serif;"><span style="font-size:130%;"> TODO:</span></pre><pre style="margin-left: 0.75in;font-family:times new roman,serif;"><span style="font-size:130%;"> Safari driver ...lots mor</span></pre></li><li style="line-height: normal;"><span style="font-size:130%;">Also: <a href="http://github.com/saivenkat/firedriver" rel="nofollow">http://github.com/saivenkat/firedriver</a> (A FireWatir implementation with<br />WebDriver core (A valiant attempt to free FireWatir from crummy JSSH)<br /></span></li><ul><ul><li style="line-height: normal;"><span style="font-size:130%;">http://developer-in-test.blogspot.com/2009/04/firedriver-firewatir-webdriver.html</span></li></ul></ul></ul><span style="font-size:130%;"><br /></span><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >AFTER STUB: Where to learn more about <b>safari drivers</b>?</span><span style="font-size:130%;"><br /></span><ul><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Look at selenium-webdriver ticketing system. (unclear where that is)</span></li><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Set up <b><span style="color:red;">safariwatir</span></b> on <b>Mac </b>(maybe merge with selenium-webdriver). Clone code:<br />git clone http://github.com/redsquirrel/safariwatir.git (2/26/2010: done on PC/Must do on MAC too).</span></li><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Study </span><span style="font-size:130%;"><a href="http://nexus.openqa.org/content/repositories/releases/org/openqa/selenium/webdriver/webdriver-safari/" rel="nofollow" target="_blank"><span style=";font-family:Times New Roman,serif;color:blue;" >webdriver-safari code</span></a></span><span style=";font-family:Times New Roman,serif;font-size:130%;" > on openqa. (2/26/2010:<b><span style="color:red;"> Deferred)</span></b></span></li><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Maybe fork <b>watirspec </b>later.</span></li><li style="line-height: normal;"><span style=";font-family:Times New Roman,serif;font-size:130%;" >Will focus less on <b>watirspec </b>until after creating the STUB. </span></li></ul></li><span style="font-size:130%;"><br /></span></ol></div><span style="font-size:130%;"><span style="font-size:180%;">MORE RESPONSES (Jari's Emails: 3/2/2010)</span><br /></span><ul><li style="font-weight: bold;"><pre><span style="font-size:130%;">> My focus is to glue the ruby-based watir-webdriver and selenium-<br />> webdriver<br />> code together with existing (or new if we have to) safari driver code<br /><br />watir-webdriver doesn't need any code changes to work with new drivers<br />introduced in the selenium-webdriver back-end. As long as the Safari<br />driver honors the semantics of the WebDriver API, it should all just<br />work from the Watir side.</span></pre></li><li style="font-weight: bold;"><pre><span style="font-size:130%;">> Do you have the gemspec files embedded in your selenium code tree<br />> to build the gem for the ruby-based selenium-webdriver gem that I<br />> found on gemcutter.org (<a href="http://rubygems.org/gems/selenium-webdriver" rel="nofollow" target="_blank">http://rubygems.org/gems/selenium-webdriver</a>)?<br /><br />There's no gemspec file, but you can build the gem using `rake gem:gem` in<br />your working copy.</span></pre></li><li style="font-weight: bold; color: rgb(68, 68, 68);"><span style="font-size:100%;">> After we get the ruby glue code in place, then we can see what safari-</span><span style="font-weight: bold;font-size:100%;" >specific<br />> code is best to use (your java version, safariwatir version,</span><span style="font-size:100%;"> </span><span style="font-weight: bold;font-size:100%;" >etc).</span><span style="font-weight: normal;font-size:100%;" ><br /><br /><span style="color: rgb(0, 0, 0);">Since the Safari driver is based on the remote driver, the amount of </span></span><i style="font-weight: normal; color: rgb(0, 0, 0);"><span style="font-size:100%;">work needed to make it<br />work from Ruby is practically negligible. If</span><span style="font-size:100%;"> </span><span style="font-size:100%;">you're interested in how the Safari driver is<br />implemented natively,</span><span style="font-size:100%;">you should look at the branch linked in Miklos ema</span><span style="font-size:100%;">il.</span></i></li></ul><br /><span style="font-size:180%;">EVEN MORE RESPONSES (</span><span style="font-size:180%;">Jari's Emails: 3/3/2010)</span><pre><br /></pre><ul><li>Which gem are you talking about watir-webdriver or selenium-webdriver? selenium-webdriver</li><li>What "working copy" are you talking about? <a href="http://code.google.com/p/selenium/source/checkout" target="_blank">http://code.google.com/p/selenium/source/checkout<span style="font-family:monospace;"></span></a></li></ul><ul><ul></ul></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-7692793182950024882010-02-26T07:23:00.000-08:002010-02-26T07:53:57.816-08:00Chapter 57: Watir-Webdriver Journey<span style="color: rgb(255, 0, 0);">L</span><span style="font-weight: bold; color: rgb(255, 0, 0);">etter Asking for Status of Safari Driver for selenium-webdriver </span><br /><br /><ol><li>Is anyone working on the "<span style="color: rgb(0, 0, 153);"><span style="font-weight: bold;">safari</span>"</span> port of <b>watir-webdriver/selenium-webdriver</b>?</li><li>If I set WATIR_WEBDRIVER_BROWSER to "safari" and use ":safari", I get "<span style=";color:#ff0000;" >unknown driver</span>".</li><li>Before I start peeling the onion (a fork), I would like to ensure that no one is working on the safari port.</li><li>FYI: Here is my recent work at Chapters 51-56 of my blog: <a href="http://my-ruby-journey.blogspot.com/" target="_blank">http://my-ruby-journey.blogspot.com/</a></li><li>My previous research appears that "safari" port work completely be isolated inside <b>selenium-webdriver</b>.</li><li>Found this:</li><li> -- <a href="http://nexus.openqa.org/content/repositories/releases/org/openqa/selenium/webdriver/webdriver-safari/" target="_blank">http://nexus.openqa.org/content/repositories/releases/org/openqa/selenium/webdriver/webdriver-safari/</a></li><li> -- <a href="http://groups.google.com/group/webdriver/browse_thread/thread/65b317dcad5399a6?pli=1" target="_blank">http://groups.google.com/group/webdriver/browse_thread/thread/65b317dcad5399a6?pli=1</a></li><li>Also know about <b>safariwatir</b> and can maybe merge this with the selenium-webdriver code, but this is onlyfor Apple (Applescript/not PC), so still pondering.</li></ol>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-11872001496273953762010-02-24T18:14:00.000-08:002010-02-24T18:17:44.559-08:00Chapter 56: Watir-Webdriver Journey1. If I set "WATIR_WEBDRIVER_BROWSER" to "safari".<br />2. Use this ruby/watir script:<br />require "watir-webdriver"<br />browser = Watir::Browser.new(:safari)<br />sleep 2<br />browser.close<br /><br />3. Then I get this:<br />C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/selenium-webdriver-0.0.17/com<br />on/src/rb/lib/selenium/webdriver/driver.rb:44:in `for':<span style="color: rgb(255, 0, 0); font-weight: bold;"> unknown driver: :safari </span>(A<br />gumentError)<br /> from C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/selenium-webdriv<br />r-0.0.17/common/src/rb/lib/selenium/webdriver.rb:61:in `for'<br /> from C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/watir-webdriver-<br />.0.1.dev5/lib/watir-webdriver/browser.rb:28:in `initialize'<br /> from use-it.rb:10:in `new'<br /> from use-it.rb:10Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-34057925711438490222010-02-21T08:14:00.000-08:002010-02-21T08:16:42.260-08:00Chapter 55: Watir-Webdriver Journey<ol><li>Added "require 'watir/ie' to setup.rb in watir directory and ran core tests.</li><li>Command: ruby core_tests.rb 2>&1 |tee o_watir_core_tests.feb21b<br /></li></ol><div style="text-align: center;">Loaded suite core_tests<br />Started<br />.............................................................................................................................................<br />....................................................................................................................................................<br />Finished in 206.192 seconds.<br />289 tests, 1420 assertions, 0 failures, 0 errors<br /><ol style="text-align: left;"><li><br /></li></ol></div>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-7548817475503192322010-02-15T10:29:00.000-08:002010-02-15T12:55:14.001-08:00Chapter 54: Watir-Webdriver JourneyDecide to move "DONE" section from wiki page to this blog so here it is.<br /><br /><b><span style="font-size:130%;">DONE:</span></b><ul><li>Dust off GIT. (2/13/2010: done)</li><li>Start using <a href="http://my-ruby-journey.blogspot.com/" target="_blank">my-Ruby-Journey</a> blog again. (2/13/2010: done)<br /></li><li>Ran waitrspec against watir-webdriver. (2/13/2010: found 59 errors)<br /></li><ul><li>Learn more about watirspec. ("git submodule for projects that<br />want to implement <a href="http://watir.com/" rel="nofollow">Watir</a>'s API." "specs were taken from <a href="http://github.com/jarib/celerity" rel="nofollow">Celerity")</a></li><li><a href="http://github.com/jarib/watirspec" rel="nofollow">http://github.com/jarib/watirspec</a></li></ul><li>Write watirspec-pending JIRA, then add research (see below): See if rcov works with Rspec (so we can use with watirspec). (2/14/2010: Later found/Already done)<br /></li><ul><li><a href="http://rspec.info/documentation/tools/rcov.html" rel="nofollow">http://rspec.info/documentation/tools/rcov.html</a></li><li><a href="http://blog.mhartl.com/2009/05/15/running-rcov-with-rspec/" rel="nofollow">http://blog.mhartl.com/2009/05/15/running-rcov-with-rspec/</a></li><li><a href="http://nullcreations.net/entries/general/enforcing-spec-coverage-with-cruisecontrol-rcov-and-rspec" rel="nofollow">http://nullcreations.net/entries/general/enforcing-spec-coverage-with-cruisecontrol-rcov-and-rspec</a><br /></li><li><a href="http://www.claytonlz.com/index.php/2009/04/how-to-setup-rspec-cucumber-webrat-rcov-and-autotest-on-leopard/" rel="nofollow">http://www.claytonlz.com/index.php/2009/04/how-to-setup-rspec-cucumber-webrat-rcov-and-autotest-on-leopard/</a></li></ul><li>Read about Rspec, RubySpec, and Guards. (2/14/2010: done)</li><li>Set up Test Env. (2/13/2010: done)</li></ul><span style="font-weight: bold;font-size:180%;" >Now on the Journey</span><br /><ol><li>After playing isolating the filefield_spec.rb spec and getting it to run separately, I decide that the best use of my time was to see if I could <span style="font-weight: bold; color: rgb(255, 0, 0);">get watirspec to run against IE</span>.</li><li>I grep'ed for firefox and found that all I needed to do was set a environment variable, <span style="font-weight: bold;">WATIR_WEBDRIVER_BROWSER </span>to either "i<span style="font-weight: bold;">e</span>" or "<span style="font-weight: bold;">chrome</span>" (not comma!!!).</li><li>I first set the env variable to chrome and got 803 of 807 failures in 27.437 seconds, so I went over to "ie" and ran it and got 151 of 807 in 469.372 seconds (both on Vista/64).</li><li>I will try configuration changes and rerun them. Found this reference regarding running Watir Unit Tests <a href="http://wiki.openqa.org/display/WTR/Run+Unit+Tests">http://wiki.openqa.org/display/WTR/Run+Unit+Tests</a> so I installed <span style="font-weight: bold;">activesupport (2.3.5)</span> and found that I already had <span style="font-weight: bold;">user-choices (1.1.6.1).</span> Also checked that that active content suggestion was checked under Advanced/ Security setting. Also checked that all new windows open as windows (not tabs) was set.<br /></li><li><span>Also will try to run tests under Administrator window and still got 153 of 807 in 446.004 seconds.</span><span> Also got a dialog popup when test suite tried to open a file. Here is the results:<a href="http://pastie.org/825967"> http://pastie.org/825967</a></span></li><li><span>Also use this to debug: <a href="http://angrez.blogspot.com/2006/12/firewatir-how-to.html">http://angrez.blogspot.com/2006/12/firewatir-how-to.html</a></span></li><li><span>Tried watir unit tests and got error too. After some study, found a not on "Run Unit Tests" that unit tests were<span style="font-weight: bold; color: rgb(255, 0, 0);"> broken with R1.6 watir gem, </span><span style="color: rgb(0, 0, 0);">so stopped.</span></span><span style="font-weight: bold;"><br /></span></li></ol>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-20295090782120074752010-02-14T12:41:00.000-08:002010-02-15T10:29:30.399-08:00Chapter 53/Day0: Watir-Webdriver JourneyHere is the first Days worth of notes with watir-webdriver and selenium-webdriver.<br /><ol><li>First experiment is to run ruby script #1.<br /></li><li>Second experiment is "#2" link.</li><li>2/6/2010: Used Ruby 1.8.6 on Vista.</li><li>2/6/2010: Could not install selenium-webdriver on Mac. (PROBLEM)<a href="http://sites.google.com/site/watironopensolaris/Home/goog_1265568611550" rel="nofollow" target="_blank"> </a><a href="http://pastie.org/813664" rel="nofollow" target="_blank">error-msg-mac</a><br /></li><li>2/7/2010: Used ruby 1.8.7 on Ubuntu. Had to install 32-bit version of Chrome on Ubuntu.</li><li>2/7/2010: Rebuilt OpenSolaris in VirtualBox on Vista PC/done. Then installed ruby-dev,<br />SUNWjruby, SUNWruby18 (plus 37 other packages) (245.03 MB) using Package Manager.<br />Then I "su -" to root and ran "gem update --system". Still getting an error message when<br />I try to install "gem install selenium-webdriver". <a href="http://pastie.org/813669" rel="nofollow" target="_blank">error-msg-link</a></li><li>Also found the following other reference related to some of the above errors.</li></ol><ul style="margin-left: 40px;"><li><a href="http://github.com/ffi/ffi/issuesearch?state=open&q=ffi#issue/30" rel="nofollow">http://github.com/ffi/ffi/issuesearch?state=open&q=ffi#issue/30</a></li><li><a href="http://groups.google.com/group/watir-general/msg/867c2ee4b52ae1e5?pli=1">http://groups.google.com/group/watir-general/msg/867c2ee4b52ae1e5?pli=1</a></li><li><a href="http://pastie.org/pastes/713484" rel="nofollow">http://pastie.org/pastes/713484</a></li></ul><ol><li>Found reference to run "sudo port install libffi" on mac for missing ffi.h errors so<br />upgrade macports and then ran command for libffi-3.0.8 package. Downloaded<br />3.0.0 ftp package and ran "configure" and "make install" and got these <a href="http://pastie.org/813704" rel="nofollow" target="_blank">errors.<br /></a></li><li>Installed selenium-webdriver's dependencies independently (rack (1.1), json_pure (1.2), ffi (0.5.4), and rspec (1.3.0).</li><li>Then installed selenium-webdriver (0.0.16) successfully and then watir-webdriver (0.0.1.dev5) successfully.</li><li>Then try mac version as documented above in table.</li><li>GIT location for watir-webdriver: <a href="http://github.com/jarib/watir-webdriver/issues" rel="nofollow">http://github.com/jarib/watir-webdriver/issues</a></li><li> Who else is working on watir-webdriver?</li></ol><ul style="margin-left: 40px;"><li>Jari Bakken is the only one who's written code so far. Željko Filipin has been very<br />helpful with testing, documenting and spreading the word.</li></ul><ol><li>What google/yahoo e-groups do I plan to use?</li></ol><ul style="margin-left: 40px;"><li>Use <span>webdriver@googlegroups.com</span> and selenium-dev lists.<br />Also the wtr-development@rubyforge.org list (on Rubyforge IIRC).<br />Then<span> watir-general@googlegroups.com. </span><br />(only me) opensolaris-announce@opensolaris.org</li></ul><ol><li>IDE being used by watir-webdriver developers: (was: Which IDE? Eclipse, Netbeans, Redmine, Intellij)</li></ol><ul style="margin-left: 40px;"><li><pre>Jari usually prefers simple text editors over IDEs;<br />TextMate on OS X and emacs everywhere else.<br />If I were to pick an IDE, it would be RubyMine.</pre></li></ul><ol><li>What is the best way to communicate?<br /> -- Google Talk, e-groups, email, twitter, IRC (sorted)<b><br /></b> <pre>IRC (I'm in #watir on freenode), but you can also reach me on email or<br /><b>GTalk.</b> I've also had good experiences collaborating on open source<br />projects with<b> Google Wave.</b></pre></li><li>Research OpenSolaris contacts/old paperwork. (done)<br /></li></ol><b><span style="font-size:130%;">Jari's Advice on Patches/Pull Requests</span></b> <ul><li><b>Fork</b> the project. </li><li>Make your feature addition or bug fix. </li><li>Add<b> tests</b> for it. This is important so I don’t break it in a future version unintentionally. </li><li><b>Commit</b>, do not mess with rakefile, version, or history. (if you want to have your<br />own version, that is fine but bump version in a commit by itself I can ignore when I pull). </li><li>Send me a <b>pul</b>l request. Bonus points for<b> topic branches</b>. </li></ul><b><span style="font-size:130%;">2/13/2010 Request:</span></b><br />I would like to help out with watir-webdriver so I have been<br />setting up different environments (see Summary Wiki below) and<br />installing the software (selenium-webdriver and watir-webdriver).Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-87371280465816356832010-02-13T16:45:00.000-08:002010-02-13T18:05:55.273-08:00Chapter 52b: Watir-Webdriver Journey<div class="entry-body"><div><div class="item-body"><div><span style="font-size:130%;"><b>Testing on Different Platforms (TEST ONLY)</b></span><br /><ul><li><span style="font-size:130%;">Set up Test Env.<br /></span></li></ul><ol><li><span style="font-size:100%;">Ran the following to set up my WatirSpec test environment on Vista and Cygwin.</span></li></ol><ul><li><span style="font-size:100%;">git clone git://github.com/jarib/watir-webdriver.git</span></li><li><span style="font-size:100%;">cd watir-webdriver/</span></li><li><span style="font-size:100%;">git submodule init</span><span style="font-size:100%;"><span style="font-family:monospace;"></span></span></li><li><span style="font-size:100%;"><span style="font-family:monospace;"></span>git submodule update</span></li></ul><ol><li><span style="font-size:100%;">Then ran "rake --trace" and got this:</span></li></ol><ul><li> $ rake --trace</li></ul><ul><li style="text-align: left;">(in C:/Documents and Settings/jasnow/gitlocalrepo/watir-webdriver)</li><li>** Invoke default (first_time)</li><li>** Invoke spec (first_time)</li><li>** Invoke check_dependencies (first_time)</li><li>** Execute check_dependencies</li><li>Missing some dependencies. Install them with the following commands:</li><li> gem install webidl --version ">= 0"</li><li>Run the specified gem commands before trying to run this again: /cygdrive/c/deepdiv</li><li>e/InstantRails-2.0-win/ruby/bin/rake</li></ul><ol><li> So I ran this: 'gem install webidl --version ">= 0"'</li><li>and then "rake" to run the tests. Here is the results: <a target="_blank" href="http://pastie.org/823752">http://pastie.org/823752</a></li><li>It finished in 128.062 seconds with 807 examples, 59 failures. (356 lines of output)<br /></li><li>Going to study the pre-reqs for original Watir Unit Tests.</li><li>Try turning off Pop-Up Blocker on Firefox by going to Tools/Options/Content and unclick on "<span style="font-weight: bold;">Block Pop-up Windows</span>".</li><li>Then I tried going into watirspec directory and running "<span style="font-weight: bold;">git checkout watir2</span>" to move to branch, but got the same number of failures. So I printed out the Rakefile and the output and will study them.</li><li>After studying them, I undid step 5 and 6 above.</li><li><a href="http://my-ruby-journey.blogspot.com/2009/02/setting-rubywatir-environment-chapter_08.html">Chapter 11 blog</a></li><li>Found I was running watir-webdriver-0.0.1.dev3, so I uninstalled it and reinstalled it ("<span style="font-weight: bold;">gem install selenium-webdriver</span>") and got 0.0.1.dev5. Also uninstall all selenium-webdriver and reinstall it and got 0.0.17. Still 356 lines of output.<br /></li><li><span style="font-weight: bold;">Which platform do you run this testsuite on?<br />Probably tests and gem is out of sync.</span><br /></li></ol></div></div></div></div><span class="email"><span class="link unselectable"><br /></span></span>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-46635982713917881272010-02-13T14:22:00.000-08:002010-02-14T12:32:45.555-08:00Chapter 52: Watir-Webdriver Journey.<span style="font-size:130%;"><b>Testing on Different Platforms (TEST ONLY)</b></span><br /><ul><li><span style="font-size:130%;">Set up Test Env.<br /></span></li></ul><ol><li><span style="font-size:100%;">Ran the following to set up my WatirSpec test environment.</span></li></ol><ul><li><span style="font-size:100%;">git clone git://github.com/jarib/watir-webdriver.git</span></li><li><span style="font-size:100%;">cd watir-webdriver/</span></li><li><span style="font-size:100%;">git submodule init</span><span style="font-size:100%;"><span style="font-family:monospace;"></span></span></li><li><span style="font-size:100%;"><span style="font-family:monospace;"></span>git submodule update</span></li></ul><ol><li><span style="font-size:100%;">Then ran "rake --trace" and got this:</span></li></ol><ul><li> $ rake --trace</li></ul><ul><li style="text-align: left;">(in C:/Documents and Settings/jasnow/gitlocalrepo/watir-webdriver)</li><li>** Invoke default (first_time)</li><li>** Invoke spec (first_time)</li><li>** Invoke check_dependencies (first_time)</li><li>** Execute check_dependencies</li><li>Missing some dependencies. Install them with the following commands:</li><li> gem install webidl --version ">= 0"</li><li>Run the specified gem commands before trying to run this again: /cygdrive/c/deepdiv</li><li>e/InstantRails-2.0-win/ruby/bin/rake</li></ul><ol><li> So I ran this: 'gem install webidl --version ">= 0"'</li><li>and then "rake" to run the tests. Here is the results: <a href="http://pastie.org/823752">http://pastie.org/823752</a></li><li>It finished in 128.062 seconds with 807 examples, 59 failures.</li><li>Going to study the pre-reqs for original Watir Unit Tests.</li><li>T<span style="font-weight: bold;">ry turning off Pop-Up Blocker</span> on Firefox by going to Tools/Options/Content and unclick on "Block Pop-up Windows".</li><li>Then I tried going into watirspec directory and running "<span style="font-weight: bold;">git checkout watir2</span>" to move to branch, but got the same number of failures. So I printed out the Rakefile and the output and will study them.</li><li>After studying, I undid step 5 above (Pop-Up Blocker) since it did not have an effect. Step 6 (watir2 checkout) did not have an effect either.<br /></li><li><span style="font-weight: bold;">QUESTION: Any other pre-reqs?</span><br /></li></ol>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-86421677344102524282010-02-13T14:17:00.001-08:002010-02-13T14:22:25.685-08:00Chapter 51: Watir-Webdriver Journey.Starting up this blog again.<br /><br />Started working on watir-webdriver (which uses selenium-webdriver)<br />in the last week or two.<br /><br />Here is my wiki page that summarizes my efforts:<br /><a href="http://sites.google.com/site/watironopensolaris/Home/webdriver-related-work">http://sites.google.com/site/watironopensolaris/Home/webdriver-related-work</a><br /><br />I will use this blog to document steps on this journey and summarize on the wiki.Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-7541196479933758152009-03-28T15:37:00.000-07:002009-03-29T19:34:13.492-07:00Chapter 50: Merb Course #1<ol><li>Day 1: First 7 pages were fun. Done with them.</li><li>Did "<span style="font-weight: bold;">gem -v"</span> and correctly got: 1.3.1 (p.16)</li><li>Did "<span style="font-weight: bold;">gem server</span>" and open browser at http://localhost:8808 and it worked. (p.17)</li><li>Downloading do_sqlite3 as follows: $ gem list --local |grep sql<br />mysql (2.7.3)<br />sqlite3-ruby (1.2.3, 1.2.1)<br />$ cd c:<br />$ cd temp<br />$ lf<br />do_sqlite3-0.9.11-x86-mswin32-60.gem<br />$<span style="font-weight: bold;"> gem install do_*</span><br />Successfully installed addressable-2.0.2<br />Successfully installed extlib-0.9.10<br />Successfully installed data_objects-0.9.11<br />Successfully installed<span style="font-weight: bold;"> do_sqlite3-0.9.11-x86-mswin32-60</span><br />4 gems installed<br />Installing ri documentation for addressable-2.0.2...<br />Installing ri documentation for data_objects-0.9.11...<br />Installing RDoc documentation for addressable-2.0.2...<br />Installing RDoc documentation for data_objects-0.9.11...</li><li>Now installing merb: After a long delay got this: $ <span style="font-weight: bold;">gem install merb</span><br />**************************************************<br />Thank you for installing rspec-1.2.2<br />Please be sure to read History.rdoc and Upgrade.rdoc<br />for useful information about this release.<br />**************************************************<br />Building native extensions. This could take a while...<br /><span style="font-weight: bold; color: rgb(255, 0, 0);">ERROR: Error installing merb:</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);"> ERROR: Failed to build gem native extension.</span><br />c:/deepdive/InstantRails-2.0-win/ruby/bin/ruby.exe extconf.rb install merb<br />creating Makefile<br />nmake<br />'<span style="color: rgb(255, 0, 0); font-weight: bold;">nmake' is not recognized as an internal or external command,</span><br /><span style="color: rgb(255, 0, 0); font-weight: bold;">operable program or batch file.</span><br />Gem files will remain installed in c:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby<br />/gems/<span style="font-weight: bold;">bcrypt-</span>ruby-2.0.5 for inspection.<br />Results logged to c:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/<span style="font-weight: bold;">bcrypt</span>-ruby<br />-2.0.5/ext/gem_make.out</li><li>Ignore the merb install<span style="color: rgb(255, 0, 0); font-weight: bold;"> errors</span> for the moment. Did next thing I think: $ g<span style="font-weight: bold;">em install dm-core</span> (p.17)<br />Successfully installed dm-core-0.9.10<br />1 gem installed<br />Installing ri documentation for dm-core-0.9.10...<br />Installing RDoc documentation for dm-core-0.9.10...</li><li>Then this: $ <span style="font-weight: bold;">gem install dm-aggregates</span> 9p.17)<br />Successfully installed dm-aggregates-0.9.10<br />1 gem installed<br />Installing ri documentation for dm-aggregates-0.9.10...<br />Installing RDoc documentation for dm-aggregates-0.9.10...</li><li>Then this: $ <span style="font-weight: bold;">gem install dm-migrations</span> (p.17)<br />Successfully installed dm-migrations-0.9.10<br />1 gem installed<br />Installing ri documentation for dm-migrations-0.9.10...<br />Installing RDoc documentation for dm-migrations-0.9.10...</li><li>Then this: $ <span style="font-weight: bold;">gem install dm-timestamps</span> (p.17)<br />Successfully installed dm-timestamps-0.9.10<br />1 gem installed<br />Installing ri documentation for dm-timestamps-0.9.10...<br />Installing RDoc documentation for dm-timestamps-0.9.10...</li><li>Then this: $ <span style="font-weight: bold;">gem install dm-types</span> (p.17)<br />Building native extensions. This could take a while...<br /><span style="font-weight: bold; color: rgb(255, 0, 0);">ERROR: Error installing dm-types:</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);"> ERROR: Failed to build gem native extension.</span><br />c:/deepdive/InstantRails-2.0-win/ruby/bin/ruby.exe extconf.rb install dm-types<br />creating Makefile<br />nmake<br /><span style="font-weight: bold; color: rgb(255, 0, 0);">'nmake' is not recognized as an internal or external command,</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">operable program or batch file.</span><br />Gem files will remain installed in c:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby<br />/gems/<span style="font-weight: bold;">bcrypt</span>-ruby-2.0.5 for inspection.<br />Results logged to c:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems<span style="font-weight: bold;">/bcrypt</span>-ruby<br />-2.0.5/ext/gem_make.out</li><li>Then this: $ <span style="font-weight: bold;">gem install dm-validations</span> (p.17)<br />Successfully installed dm-validations-0.9.10<br />1 gem installed<br />Installing ri documentation for dm-validations-0.9.10...<br />Installing RDoc documentation for dm-validations-0.9.10...</li><li>"Finally" this: $ <span style="font-weight: bold;">gem install dm-serializer</span> (p.17)<br />Successfully installed dm-serializer-0.9.10<br />1 gem installed<br />Installing ri documentation for dm-serializer-0.9.10...<br />Installing RDoc documentation for dm-serializer-0.9.10...<br /><span style="font-weight: bold; color: rgb(255, 0, 0);">Could not find main page README.txt</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">Could not find main page README.txt</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">Could not find main page README.txt</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">Could not find main page README.txt</span></li><li>Here is a google thread on dm-types/merb install problem. (p.17) <a href="http://groups.google.com/group/merb/browse_thread/thread/d0bc635005305de8"><span style="color: rgb(255, 0, 0);">http://groups.google.com/group/merb/browse_thread/thread/d0bc635005305de8</span></a></li><li>Did a "<span style="font-weight: bold;">gem fetch dm-types</span>" and it worked.</li><li>Did a "<span style="font-weight: bold;">gem unpack dm-types</span>" and it worked.</li><li>Did a $ <span style="font-weight: bold;">find . -exec grep -il crypt {} \;</span><br />./History.txt<br />./lib/dm-types/bcrypt_hash.rb<br />./lib/dm-types.rb<br />./Manifest.txt<br />./Rakefile<br />./spec/integration/bcrypt_hash_spec.rb<br />./spec/unit/bcrypt_hash_spec.rb<br />[/cygdrive/c/...dm-types-0.9.10] $</li><li>Print out this web page: <a href="http://www.ghostonthird.com/2007/11/17/merb-on-windows-it-works/">http://www.ghostonthird.com/2007/11/17/merb-on-windows-it-works/</a></li><li><a href="http://www.ghostonthird.com/2007/11/17/merb-on-windows-it-works/">The dependencey was removed from github on March 23, 2009: http://github.com/datamapper/dm-more/commit/d37f392ce69e5bfbc71b0aa8abade5dd22c00c63</a></li><li><a href="http://github.com/datamapper/dm-more/commit/d37f392ce69e5bfbc71b0aa8abade5dd22c00c63">Trying to debug "dm-types" (merb) install problem so I repeated Dan's steps: <span style="font-weight: bold;">$ gem fetch merb (p.17)</span><br />Downloaded merb-1.0.10</a></li><li><a href="http://github.com/datamapper/dm-more/commit/d37f392ce69e5bfbc71b0aa8abade5dd22c00c63">Then unpacked it $ g<span style="font-weight: bold;">em unpack merb-1.0.10.gem</span><br />Unpacked gem: 'c:/Documents and Settings/jasnow/gitlocalrepo/merb-1.0.10'</a></li><li><a href="http://github.com/datamapper/dm-more/commit/d37f392ce69e5bfbc71b0aa8abade5dd22c00c63">Then created gemspec file: $ <span style="font-weight: bold;">gem spec merb -v '1.0.10' -r > merb-1.0.10.gem</span>s<span style="font-weight: bold;">pec </span>and it had 173 lines in it.</a></li><li>Then edited the previous step's gemspec file. Changed <span style="font-weight: bold;">"0.9.10" to "0.9.9". </span><span style="font-weight: bold;">!ruby/object:Gem::Dependency</span><br /><span style="font-weight: bold;"> name: dm-types</span><br /><span style="font-weight: bold;"> type: :runtime</span><br /><span style="font-weight: bold;"> version_requirement:</span><br /><span style="font-weight: bold;"> version_requirements: !ruby/object:Gem::Requirement</span><br /><span style="font-weight: bold;"> requirements:</span><br /><span style="font-weight: bold;"> - - ~></span><br /><span style="font-weight: bold;"> - !ruby/object:Gem::Version</span><br /><span style="font-weight: bold;"> <span style="color: rgb(255, 0, 0);"> version: 0.9.9</span></span><br /><span style="font-weight: bold;"> version:</span></li><li><span style="font-weight: bold;">Then built gemspec file. $ gem build -V merb-1.0.10.gemspec<br /></span>WARNING: RDoc will not be generated (has_rdoc == false)<br />Successfully built RubyGem<br />Name: merb<br />Version: 1.0.10<br />File: merb-1.0.10.gem<span style="font-weight: bold;"></span></li><li><span style="font-weight: bold;">Still a problem.<br /></span></li><li><span style="font-size:100%;"><code>Did this: <span style="font-weight: bold;">git clone git://github.com/datamapper/dm-more.git </span></code></span></li><li><span style="font-size:100%;">Ran<span style="font-weight: bold;"> "rake gem" </span>and it worked and put gem into pkg directory.</span></li><li><span style="font-size:100%;">Tried this: $ <span style="font-weight: bold;">gem install dm-more-0.9.11.gem</span><br />ERROR: Error installing dm-more-0.9.11.gem:<br /> dm-more requires dm-core (= 0.9.11, runtime)</span></li><li><span style="font-size:100%;">So I got dm-core:<span style="font-weight: bold;"> </span></span><code style="font-weight: bold;">git clone git://github.com/datamapper/dm-core.git </code></li><li>Repeated step 26 and 27, but it need data-objects. Getting old...<br /></li><li>So I got data-objects: <code style="font-weight: bold;">git clone git://github.com/sam/do.git(OUT OF DATE)<br /></code></li><li style="font-weight: bold;"> <code>So I did this one: git clone git://github.com/datamapper/data_mapper.git </code></li><li style="font-weight: bold;"><span style="font-weight: normal;">Repeated step 26 and 27.</span> <span style="font-weight: normal;">Got same message as step 27 about dm-core.</span></li><li style="font-weight: bold;"><span style="font-weight: normal;">Started using Dan's instructions. Repeated step 19. It worked. $ <span style="font-weight: bold;">gem fetch merb</span><br />Downloaded merb-1.0.10</span></li><li style="font-weight: bold;"><span style="font-weight: normal;">Repeated step 20: $ <span style="font-weight: bold;">gem unpack merb-1.0.10.gem</span><br />Unpacked gem: 'c:/Documents and Settings/jasnow/gitlocalrepo/merb-1.0.10'</span></li><li style="font-weight: bold;"><span style="font-weight: normal;">Repeated step 21: $<span style="font-weight: bold;"> gem spec merb -v '1.0.10' -r > merb-1.0.10.gemspec</span></span></li><li><span style="font-weight: normal;">Repeated step 22: Change 1 (s/0.9.10/0.9.9/) line in new <span style="font-weight: bold;">merb-1.0.10.gemspec</span> file.</span></li><li><span style="font-weight: normal;">Repeated step 23: $ <span style="font-weight: bold;">gem build -V merb-1.0.10.gemspec</span><br />WARNING: RDoc will not be generated (has_rdoc == false)<br />Successfully built RubyGem<br />Name: merb<br />Version: 1.0.10<br />File: merb-1.0.10.gem</span></li><li><span style="font-weight: normal;">NEW STUFF: Ran this: $ <span style="font-weight: bold;">gem install dm-validations</span><br />Successfully installed dm-validations-0.9.10<br />1 gem installed<br />Installing ri documentation for dm-validations-0.9.10...<br />Installing RDoc documentation for dm-validations-0.9.10...</span></li><li><span style="font-weight: normal;">Ran this: $ <span style="font-weight: bold;">gem install dm-sweatshop</span><br />Successfully installed randexp-0.1.4<br />Successfully installed dm-sweatshop-0.9.10<br />2 gems installed<br />Installing ri documentation for randexp-0.1.4...<br />Installing ri documentation for dm-sweatshop-0.9.10...<br />Installing RDoc documentation for randexp-0.1.4...<br />Installing RDoc documentation for dm-sweatshop-0.9.10...<br /><span style="color: rgb(255, 0, 0); font-weight: bold;">Could not find main page README.txt</span><br /><span style="color: rgb(255, 0, 0); font-weight: bold;">Could not find main page README.txt</span><br /><span style="color: rgb(255, 0, 0); font-weight: bold;">Could not find main page README.txt</span><br /><span style="color: rgb(255, 0, 0); font-weight: bold;">Could not find main page README.txt</span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Ran this: $ <span style="font-weight: bold;">gem install dm-serializer</span></span><br /><span style="color: rgb(0, 0, 0);">Successfully installed dm-serializer-0.9.10</span><br /><span style="color: rgb(0, 0, 0);">1 gem installed</span><br /><span style="color: rgb(0, 0, 0);">Installing ri documentation for dm-serializer-0.9.10...</span><br /><span style="color: rgb(0, 0, 0);">Installing RDoc documentation for dm-serializer-0.9.10...</span></span><span style="color: rgb(255, 0, 0); font-weight: bold;"><br />Could not find main page README.txt<br />Could not find main page README.txt<br />Could not find main page README.txt<br />Could not find main page README.txt</span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Ran this: $ <span style="font-weight: bold;">gem install dm-aggregates</span></span><br /><span style="color: rgb(0, 0, 0);">Successfully installed dm-aggregates-0.9.10</span><br /><span style="color: rgb(0, 0, 0);">1 gem installed</span><br /><span style="color: rgb(0, 0, 0);">Installing ri documentation for dm-aggregates-0.9.10...</span><br /><span style="color: rgb(0, 0, 0);">Installing RDoc documentation for dm-aggregates-0.9.10...</span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">MAGIC KEY: Ran this: $ <span style="font-weight: bold;">gem install dm-types <span style="color: rgb(102, 0, 204);">--version '= 0.9.9'</span></span><br />Successfully installed dm-types-0.9.9<br />1 gem installed<br />Installing ri documentation for dm-types-0.9.9...<br />Installing RDoc documentation for dm-types-0.9.9...</span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">FINALLY Ran this: $ <span style="font-weight: bold;">gem install --local merb-1.0.10.gem</span><br />Successfully installed merb-1.0.10<br />1 gem installed</span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Ran this; $ <span style="font-weight: bold;">gem install webrat</span><br />Successfully installed nokogiri-1.2.3-x86-mswin32-60<br />Successfully installed webrat-0.4.3<br />2 gems installed<br />Installing ri documentation for nokogiri-1.2.3-x86-mswin32-60...<br />Installing ri documentation for webrat-0.4.3...<br />Installing RDoc documentation for nokogiri-1.2.3-x86-mswin32-60...<br />Installing RDoc documentation for webrat-0.4.3...</span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Ran this: <span style="font-weight: bold;">$ gem list</span> -- See results at <a href="http://www.pastie.org/430974">http://www.pastie.org/430974</a></span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Ran this: $ <span style="font-weight: bold;">gem spec merb </span>-- See results at <a href="http://www.pastie.org/430978">http://www.pastie.org/430978</a></span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Ran this: <span style="font-weight: bold;">$ gem dependency merb</span> -- See results at <a href="http://www.pastie.org/430979">http://www.pastie.org/430979</a></span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Ran this: $ <span style="font-weight: bold;">gem install mongrel</span><br />Successfully installed mongrel-1.1.5-x86-mswin32-60<br />1 gem installed<br />Installing ri documentation for mongrel-1.1.5-x86-mswin32-60...<br />Installing RDoc documentation for mongrel-1.1.5-x86-mswin32-60...</span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Ran this: $ <span style="font-weight: bold;">gem spec mongrel -</span>- See results at <a href="http://www.pastie.org/430984">http://www.pastie.org/430984</a></span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Install 3 sqlite files on page 20. (done)</span></span></span></li><li><span style="font-weight: normal;"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Now a problem seeting $PATH.<br /></span></span></span></li></ol>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-9976053876701824312009-03-20T18:18:00.000-07:002009-03-20T18:52:54.063-07:00Chapter 49: Sinatra Course #6<ol><li>Unit 6 starts on page 38. Instruction on how to connect to Postgress: <a href="http://gist.github.com/68277">http://gist.github.com/68277</a></li><li>Page 39 was the code for crud.rb and pages 40-43 explains the different parts of the code.</li><li>Created new.erb and show.erb. (p.42, 43)</li><li>Ran "<span style="font-weight: bold;">ruby crud.rb</span>" and it worked. (p.43)<br /></li><li>Stopped on Exercise at bottom of page 43. <span style="font-weight: bold;">Open Source Web Designs:</span> <a href="http://www.oswd.org/">http://www.oswd.org/</a><br /></li></ol>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-33451895713848035582009-03-20T17:50:00.000-07:002009-03-20T18:15:36.111-07:00Chapter 48: Sinatra Course #5<ol><li><span style="font-size:100%;"><span style="font-weight: bold;">Text Reversing Service</span>: Unit 5 starts on page 32.</span></li><li><span style="font-size:100%;">Did everything on page 32 and it worked as shown on page 33.</span></li><li><span style="font-size:100%;">Did everything on page 34 and saw no change. (p.34)</span></li><li><span style="font-size:100%;"><span style="color: rgb(255, 0, 0); font-weight: bold;">QUESTION: Where to put show.erb? My guess is under views.</span></span></li><li><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">Made the changes on top of page 35 and it worked. (p.35)</span></span></li><li><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">Did #1 at bottom of page 35, but only had<span style="font-weight: bold; color: rgb(255, 0, 0);"> partial information (did not know "severe-night-58" string yet; see step 4 on next page) </span><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">t</span></span>o do step #2. Did as much as possible.</span></span></li><li><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">Step 3: Set up Git. (done) (p.36)</span></span></li><li><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">Step 4: Set up Heroku. Now I have step 6 above string. It is "deep-wind-75".</span></span></li><li><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">Step 5: Created remote add alias. Used "page36" $ git <span style="font-weight: bold;">remote add page36 </span>git@heroku.com:deep-wind-75.git</span></span></li><li><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">Step 6: Deployed to Heroku: $ <span style="font-weight: bold;">git push page36 master (p.37)</span><br />Enter passphrase for key '/home/jasnow/.ssh/id_rsa':<br />Counting objects: 7, done.<br />Compressing objects: 100% (7/7), done.<br />Writing objects: 100% (7/7), 870 bytes, done.<br />Total 7 (delta 0), reused 0 (delta 0)<br />-----> Heroku receiving push<br />-----> Rack app detected<br /> Compiled slug size is 0.0MB<br />-----> Launching........ done<br /> App deployed to Heroku<br />To git@heroku.com:<span style="font-weight: bold;">deep-wind-75.git</span><br /> * [new branch] master -> master</span></span></li><li><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">Tried it in browser and it worked. <a href="http://deep-wind-75.heroku.com/reverse">http://deep-wind-75.heroku.com/reverse</a></span></span></li><li><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">End of Unit 5.</span></span></li></ol>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-11919892527150724762009-03-20T16:19:00.000-07:002009-03-20T17:49:59.113-07:00Chapter 47: Sinatra Course #4<ul><li>Views: Did the stuff on page 27 and 28 to add Views to electric-robot-51 and it worked.</li><li>Now to Layouts: Created layout.erb and copies contents from zip file. (p.29)</li><li>Then created "public" directory and copies contents (7 files) from zip file .(p.29-30)</li><li>$ <span style="font-weight: bold;">git add .</span> ; $ <span style="font-weight: bold;">git commit -m 'committing public files'</span><br />[master]: created edeffeb: "committing public files"<br />7 files changed, 117 insertions(+), 0 deletions(-)<br />create mode 100644 public/images/Thumbs.db<br />create mode 100644 public/images/background.png<br />create mode 100644 public/images/background_bottom.gif<br />create mode 100644 public/images/background_content.gif<br />create mode 100644 public/images/background_top.gif<br />create mode 100644 public/images/nw.gif<br />create mode 100644 public/stylesheets/style.css<br />$<span style="font-weight: bold;"> git push heroku</span> master<br />Enter passphrase for key '/home/jasnow/.ssh/id_rsa':<br />Counting objects: 18, done.<br />Compressing objects: 100% (15/15), done.<br />Writing objects: 100% (16/16), 4.72 KiB, done.<br />Total 16 (delta 4), reused 0 (delta 0)<br />-----> Heroku receiving push<br />-----> Rack app detected<br /> Compiled slug size is 0.0MB<br />-----> Launching........ done<br />To App deployed to Herokugit@heroku.com:electric-robot-51.git<br /> 08779c4..edeffeb master -> master<br /></li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-64159599092755781512009-03-20T12:12:00.000-07:002009-03-20T16:03:27.686-07:00Chapter 46: Sinatra Course #3<ol><li>Started some of the Heroku during <a href="http://my-ruby-journey.blogspot.com/2009/03/setting-heroku-blogs.html">Chapter 39</a> of this blog.</li><li>Got my Heroku account.<br /></li><li>Installed heroku gem file. [~] $ <span style="font-weight: bold;">gem install heroku</span> (p.23)<br />Successfully installed thor-0.9.9<br />Successfully installed sequel-2.10.0<br />Successfully installed taps-0.2.9<br />Successfully installed heroku-0.6.1<br />4 gems installed<br />Installing ri documentation for thor-0.9.9...<br />Installing ri documentation for sequel-2.10.0...<br />Installing ri documentation for taps-0.2.9...<br />Installing ri documentation for heroku-0.6.1...<br />Installing RDoc documentation for thor-0.9.9...<br />Installing RDoc documentation for sequel-2.10.0...<br />Installing RDoc documentation for taps-0.2.9...<br />Installing RDoc documentation for heroku-0.6.1...</li><li>Had a lot of problems running heroku keys:add" so I created a shell script, heroku, and added it to my $HOME/bin directory . $ <span style="font-weight: bold;">heroku keys:add</span> (p.23)<br />Uploading ssh public key C:\Users\<login>/.ssh/id_rsa.pub</login></li><li>Create <span style="font-weight: bold;">config.ru</span> in $HOME directory and put 'require "myapp"' and "run Sinatra::Application" in it.</li><li>Set up Git (init, add, commit) for myapp. (p.24)</li><li>Installed Git for Cygwin from Cygwin repository. (done)</li><li>Run this: $ <span style="font-weight: bold;">heroku create --remote</span> 9p.25)<br />Created http://electric-robot-51.heroku.com/ | git@heroku.com:electric-robot-51.git<br />Git remote heroku added</li><li>Ran this: $ <span style="font-weight: bold;">heroku list</span> 9p.25)<br />young-night-98<br />electric-robot-51</li><li>Create git-remote: $ <span style="font-weight: bold;">git remote add </span>electricrobot git@heroku.com:electric-robot-51.git (p.25)<br />$ git remote add electric git@heroku.com:electri<br />c-robot-51.git<br />fatal: remote electric already exists.</li><li>Did this and got error: $ <span style="font-weight: bold;">git push electricrobot master</span><br />fatal: exec ssh failed.<br />fatal: The remote end hung up unexpectedly</li><li>Had to install OpenSSH from Cygwin repository.</li><li>Got different response: $<span style="font-weight: bold;"> git push heroku master</span> (p.26)<br />The authenticity of host 'heroku.com (75.101.145.87)' can't be established.<br />RSA key fingerprint is <removed>.<br />Are you sure you want to continue connecting (yes/no)? yes<br />Warning: Permanently added 'heroku.com,75.101.145.87' (RSA) to the list of known ho<br />sts.<br />Permission denied (publickey).<br />fatal: The remote end hung up unexpectedly</removed></li><li>Ran step 10: "Confirm:" $ h<span style="font-weight: bold;">eroku info --app electric-robot-51</span><br />=== electric-robot-51<br />Web URL: http://electric-robot-51.heroku.com/<br />Git Repo: git@heroku.com:electric-robot-51.git<br />Collaborators: jasnow@hotmail.com</li><li>Save this URL: <a href="http://heroku.disqus.com/heroku_api_and_external_git_access/">http://heroku.disqus.com/heroku_api_and_external_git_access/</a></li><li><a href="http://zylstra.wordpress.com/2008/08/29/overcome-herokus-permission-denied-publickey-problem/">http://zylstra.wordpress.com/2008/08/29/overcome-herokus-permission-denied-publickey-problem/</a></li><li>Started over. Printed out a couple things. Read them. Redid "<span style="font-weight: bold;">ssh-keygen -t dsa"</span> and "<span style="font-weight: bold;">heroku keys:add".</span></li><li>Then tried the push again:<span style="font-weight: bold;"> $ git push heroku master<br /></span>The authenticity of host 'heroku.com (75.101.163.44)' can't be established.<br />RSA key fingerprint is <removed>.<br />Are you sure you want to continue connecting (yes/no)? yes<br />Warning: Permanently added 'heroku.com,75.101.163.44' (RSA) to the list of known hosts.<br />Enter passphrase for key '/home/<login>/.ssh/id_dsa':<br />Counting objects: 14, done.<br />Compressing objects: 100% (10/10), done.<br />Writing objects: 100% (14/14), 2.76 KiB, done.<br />Total 14 (delta 1), reused 0 (delta 0)<br /><br />-----> Heroku receiving push<br /><span style="color: rgb(255, 0, 0); font-weight: bold;">FAILED</span><br /><span style="color: rgb(255, 0, 0); font-weight: bold;"> ! Heroku push rejected, no Rails or Rack app detected.</span><br /><br />error: hooks/pre-receive exited with error code 1<br />To git@heroku.com:electric-robot-51.git<br />! [remote rejected] master -> master (pre-receive hook declined)<br />error: failed to push some refs to 'git@heroku.com:electric-robot-51<span style="font-weight: bold;">.git'</span></login></removed></li><li><span style="font-weight: bold;">SINATRA INTERVIEW EXAMPLE: </span><span>$ mkdir wiki</span><span style="font-weight: bold;"><br /></span><span>$ cd wiki<br />$ git init<br />Initialized empty Git repository in /cygdrive/c/Documents and Settings/jasnow/gitlcalrepo/wiki/.git/<br />$ <span style="font-weight: bold;">heroku create</span><br />Created http://severe-moon-59.heroku.com/ | git@heroku.com:severe-moon-59.git<br />Git remote heroku added</span></li><li><span style="font-weight: bold;">$ git push heroku master<br /></span><span>Enter passphrase for key '/home/jasnow/.ssh/id_rsa':<br />Counting objects: 4, done.<br />Compressing objects: 100% (3/3), done.<br />Writing objects: 100% (4/4), 831 bytes, done.<br />Total 4 (delta 0), reused 0 (delta 0)<br />-----> Heroku receiving push<br />-----> Rack app detected<br /> Compiled slug size is 0.0MB<br />-----> Launching......... done<br /> App deployed to Heroku<br />To git@heroku.com:severe-moon-59.git</span><span style="font-weight: bold;"><br /></span><span> * [new branch] master -> master</span></li><li><span>Now that Wiki example works, I repeated it for original example (see step 18). </span><span style="font-weight: bold;"> $ git push heroku master<br /></span><span>Enter passphrase for key '/home/jasnow/.ssh/id_rsa':<br />Counting objects: 17, done.<br />Compressing objects: 100% (12/12), done.<br />Writing objects: 100% (17/17), 3.04 KiB, done.<br />Total 17 (delta 2), reused 0 (delta 0)<br />-----> Heroku receiving push<br />-----> Rack app detected<br /> Compiled slug size is 0.0MB<br />-----> Launching........ done<br /> App deployed to Heroku<br />To git@heroku.com:electric-robot-51.git<br />* [new branch] master -> master</span></li><li><span style="font-weight: bold;"><a href="http://electric-robot-51.heroku.com/">http://electric-robot-51.heroku.com/ worked.</a></span></li><li><span style="font-weight: bold;"><a href="http://severe-moon-59.heroku.com/Home">http://severe-moon-59.heroku.com/Home worked.</a><br /></span></li></ol>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com2tag:blogger.com,1999:blog-453674908286179212.post-45087317525733110242009-03-20T11:48:00.000-07:002009-03-20T12:12:56.122-07:00Chapter 45: Sinatra Course #2<ul><li>Unit 2 starts on page 19. Moved App. 1 (GIT) to this section.</li><li>Created directory "<span style="font-weight: bold;">mkdir sinatra_program</span>" under gitlocalrepo directory. (p.19)</li><li>Then put "require 'sinatra' into myapp.rb and ran it. :$ ruby<span style="font-weight: bold;"> myapp.rb</span> (p.20)<br />== Sinatra/0.9.1.1 has taken the stage on 4567 for development with backup from Mon<br />grel</li><li><h2><span style="font-size:100%;">Then I open and browser window with http://localhost:4567 and got this: </span>Sinatra doesn't know this ditty.</h2></li><li><br /></li><li> <img src="http://localhost:4567/__sinatra__/404.png" /> <div id="c"> Try this: <pre>get '/' do<br />"Hello World"<br />end</pre></div></li><li>Then I add "get" handler with just a comment and it worked. Then added 'Welcome from RubyLearning' and it worked. (p.21)</li><li>PROBLEM: Have a problem getting Cygwin to take the Control-C.</li><li><span style="color: rgb(255, 0, 0); font-weight: bold;">QUESTION: Unclear why GIT was mentioned in this section. We did not use it.</span><br /></li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-88365976950021090082009-03-20T05:59:00.000-07:002009-03-20T11:39:47.029-07:00Chapter 44: Sinatra Course #1<ol><li>Read Sinatra Interview. <a href="http://rubylearning.com/blog/2009/03/20/interview-ryan-tomayko-on-sinatra/"> http://rubylearning.com/blog/2009/03/20/interview-ryan-tomayko-on-sinatra/</a></li><li>Subscribed to Sinatra Forums and printed out forums emails I missed.</li><li>Downloaded Sinatra ebook and printed it out.</li><li>Started reading ebook. Installed Sinatra: [~] <span style="font-weight: bold;">$ gem install sinatra</span> (p.16)<br />Successfully installed rack-0.9.1<br />Successfully installed sinatra-0.9.1.1<br />2 gems installed<br />Installing ri documentation for rack-0.9.1...<br />Installing ri documentation for sinatra-0.9.1.1...<br />Installing RDoc documentation for rack-0.9.1...<br />Installing RDoc documentation for sinatra-0.9.1.1...</li><li>Then installed builder and haml gems. [~] $ <span style="font-weight: bold;">gem install builder haml</span> (p.16)<br />Successfully installed builder-2.1.2<br />Successfully installed haml-2.0.9<br />2 gems installed<br /><span style="font-weight: bold; color: rgb(255, 0, 0);">Installing ri documentation for builder-2.1.2...</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">ERROR: While generating documentation for builder-2.1.2</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">... MESSAGE: Unhandled special: Special: type=17, text="<!-- HI -->"</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">... RDOC args: --ri --op C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/doc/build</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">er-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --qui</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">et lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc</span><br />(continuing with the rest of the installation)<br />Installing ri documentation for haml-2.0.9...<br /><span style="font-weight: bold; color: rgb(255, 0, 0);">ERROR: While generating documentation for haml-2.0.9</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">... MESSAGE: Unhandled special: Special: type=17, text="<!-- This is the peanutbu</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">tterjelly element -->"</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">... RDOC args: --ri --op C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/doc/haml-</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">2.0.9/ri --title Haml --main README.rdoc --exclude lib/haml/buffer.rb --line-number</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">s --inline-source --quiet lib FAQ MIT-LICENSE VERSION README.rdoc REVISION</span><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">(continuing with the rest of the installation)</span><br />Installing RDoc documentation for builder-2.1.2...<br />Installing RDoc documentation for haml-2.0.9...</li><li>Installed mongrel. [~] $ <span style="font-weight: bold;">gem install mongrel</span> (p.16)<br />Successfully installed mongrel-1.1.5-x86-mswin32-60<br />1 gem installed<br />Installing ri documentation for mongrel-1.1.5-x86-mswin32-60...<br />Installing RDoc documentation for mongrel-1.1.5-x86-mswin32-60...</li><li>Ran: g<span style="font-weight: bold;">em specification mongrel </span>(p.17) and got 155 wc-lines of output. See: <a href="http://www.pastie.org/422175">http://www.pastie.org</a><a href="http://www.pastie.org/422175">/422175</a></li><li>Downloaded <span style="font-weight: bold;">sqlite3.def, sqlite3.dll,</span> and <span style="font-weight: bold;">sqlite3.exe</span> and put them in Ruby's bin directory. (p.17)</li><li>Then I install sqlite3-ruby gem: <span style="font-weight: bold;">gem install sqlite3-ruby -v=1.2.3 (p.18)<br /></span></li><li>Successfully installed sqlite3-ruby-1.2.3-x86-mswin32<br />1 gem installed<br />Installing ri documentation for sqlite3-ruby-1.2.3-x86-mswin32...<br />Installing RDoc documentation for sqlite3-ruby-1.2.3-x86-mswin32...<br /></li><li>Finally installed activerecord. $ g<span style="font-weight: bold;">em install activerecord</span> (p. 18)<br />Successfully installed activesupport-2.3.2<br />Successfully installed activerecord-2.3.2<br />2 gems installed<br />Installing ri documentation for activesupport-2.3.2...<br />Installing ri documentation for activerecord-2.3.2...<br />Installing RDoc documentation for activesupport-2.3.2...<br />Installing RDoc documentation for activerecord-2.3.2...</li><li>Finished with "Unit 1" of Sinatra Course.<br /></li></ol>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-82384252805405576092009-03-13T17:33:00.001-07:002009-03-14T11:50:53.884-07:00Chapter 43: JSSH/C++ Code<ul><li>JSSH XPI Table: <a href="http://sites.google.com/site/watironopensolaris/Home/watir-on-opensolaris/experiencecompilingopensolarisonvirtualbox/xpi-content-comparison">http://sites.google.com/site/watironopensolaris/Home/watir-on-opensolaris/experiencecompilingopensolarisonvirtualbox/xpi-content-comparison</a></li><li>JSSH Code Choices: <a href="http://sites.google.com/site/watironopensolaris/Home/jssh-xpi-for-linux/jssh-code-choices">http://sites.google.com/site/watironopensolaris/Home/jssh-xpi-for-linux/jssh-code-choices</a><br /></li><li><a href="http://sites.google.com/site/watironopensolaris/Home/watir-on-opensolaris/experiencecompilingopensolarisonvirtualbox">People: </a><a href="http://sites.google.com/site/watironopensolaris/Home/firewatir-archive/solarwatircredits">http://sites.google.com/site/watironopensolaris/Home/firewatir-archive/solarwatircredits</a></li><li>Downloaded OpenSolaris tarball to Vista/64 Cygwin (email at <a href="http://www.pastie.org/415823">http://www.pastie.org/415823</a>): <a href="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.1b3/contrib/solaris_tarball/">http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.1b3/contrib/solaris_tarball/. Note that I have no version of JSSH<br /></a></li><li>Downloaded firewatir to Vista/64 Cygwin (from <a href="http://code.google.com/p/firewatir/source/checkout">http://code.google.com/p/firewatir/source/checkout</a>). Revision 150. Yes, I have R1.5, R2.0, and R3.0 versions of JSSH. Wrote a bash script, 3way-diff to compare all 3 versions and no differences except an extra file, foo.out (looks like it is a cvs history file).</li><li>Downloaded OpenSolaris' firefox-3.0.6-source.tar.bz2, unzipped it, untarred, and found one version of JSSH. I compared R3.0 of firewatir R3.0 vs. this version and found only one different file (jar.mn) if you ignored the CVS directories and files.</li><li>Next day, I read the old wiki notes (see above bullet) and identified that I needed to create/find install.rdf (was install.js for R2.x) and chrome.manifest (read "NA" for OpenSolaris). <span style="color: rgb(255, 0, 0); font-weight: bold;">Also found that Mac needed 5 more files (libjssh.dylib, jssh-debug.js, readme.txt, configure.xul, and tasksOverlay.xul). Unclear if Mac files are derived or input. Will contact Mac person to figure that out.</span></li><li>Downloaded all versions of XPI files from openqa wiki and used Filzip to unzip them. I will add the install.rdf and chrome.manifest from the R3 Windows version to my files.</li><li>Windows XPI Contact:<a href="http://code.google.com/p/firewatir/"> Google Code's FireWatir</a> author<br /></li><li>Linux/Mac XPI: <a href="http://alephzarro.com/blog/">http://alephzarro.com/blog/</a><br /></li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-49084413684109798972009-03-13T10:06:00.001-07:002009-03-13T17:35:07.448-07:00Chapter 42: Webdriver<ul><li>WebDriver JavaDocs: <a href="http://webdriver.googlecode.com/svn/javadoc/index.html">http://webdriver.googlecode.com/svn/javadoc/index.html</a></li><li>GTAC Video: <a href="http://www.youtube.com/watch?v=tGu1ud7hk5I">http://www.youtube.com/watch?v=tGu1ud7hk5I</a></li><li>Printed out a lot of information about webdriver from WebDriver Google Code: <a href="http://code.google.com/p/webdriver/">http://code.google.com/p/webdriver/</a></li><li>Downloaded <a href="http://webdriver.googlecode.com/files/webdriver-jobbie-870.zip">webdriver-jobbie-860.zip</a> and<a href="http://webdriver.googlecode.com/files/webdriver-firefox-870.zip"> webdriver-firefox-870.zip.</a></li><li><span style="font-size:100%;"><tt>Ran this under admin login on vista/64: svn checkout <strong><em>http</em></strong>://webdriver.googlecode.com/svn/trunk/ webdriver-read-only</tt></span> </li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-44565532263060692652009-03-12T13:35:00.000-07:002009-03-13T17:35:47.025-07:00Chapter 41: Watir (FireWatir Unit Tests)<ul><li>Tried to run the firewatir/unittests/mozilla_all_tests.rb, but FIRST I had to change to "<span style="font-weight: bold;">visible: true"</span> and "<span style="font-weight: bold;">browser: firefox</span>" in <span style="font-weight: bold;">options.yml</span> and set "<span style="font-weight: bold;">new window</span>" inside Firefox/Tools/Options/Tabs/"<span style="font-weight: bold;">New page should be opened in:"</span>. Got 312, 1661, 0, 0 in 154.494 seconds.</li><li>Looks at the Firewatir Ruby code and found <span style="font-weight: bold;">four</span> methods of interest. <span style="font-weight: bold;">jssh_command</span> is used to collect the javascript commands;<span style="font-weight: bold;"> jssh_socket.send </span>takes jssh_command and send it to the window; <span style="font-weight: bold;">read_socket</span> gets the return code from jssh_socket.send. Also<span style="font-weight: bold;"> js_eval</span> is similar to jssh_socket.send.</li><li>My Previous Wiki: <a href="http://sites.google.com/site/watironopensolaris/Home/jssh-xpi-for-linux">http://sites.google.com/site/watironopensolaris/Home/jssh-xpi-for-linux</a></li><li>My Previous "SolarWatir" Wiki Diary:<a href="http://sites.google.com/site/watironopensolaris/Home/watir-on-opensolaris/experiencecompilingopensolarisonvirtualbox"> http://sites.google.com/site/watironopensolaris/Home/watir-on-opensolaris/experiencecompilingopensolarisonvirtualbox</a></li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-17844979817258697522009-03-11T11:02:00.001-07:002009-03-13T06:51:14.468-07:00Chapter 40: Generic JSSH Blogs<ul><li><a href="http://blog.mozilla.com/addons/2009/03/11/firefox-add-ons-developer-guide/">http://blog.mozilla.com/addons/2009/03/11/firefox-add-ons-developer-guide/</a></li><li><a href="http://gojko.net/2009/03/11/qcon-london-2009-script-jvm-with-javascript-and-get-stack-based-continuations/">http://gojko.net/2009/03/11/qcon-london-2009-script-jvm-with-javascript-and-get-stack-based-continuations/</a></li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-41452704007084840292009-03-08T19:36:00.000-07:002009-03-15T09:39:17.850-07:00Chapter 39: Heroku Blogs<ol><li style="font-weight: bold;"><span style="font-size:100%;">Install the Heroku gem file: gem install heroku</span></li><li style="font-weight: bold;">Upload your public key: heroku keys:add Enter your Heroku credentials. Email: Password: ********</li><li><span style="font-weight: bold;">Uploading ssh public key C:\Users\jasnow/.ssh/id_rsa.pub</span><br /><span style="font-weight: bold;">Enter your Heroku credentials.</span><br /><span style="font-weight: bold;">Email: jasnow@hotmail.com</span><br /><span style="font-weight: bold;">Password:</span><br /><span style="font-weight: bold;">Uploading ssh public key C:\Users\jasnow/.ssh/id_rsa.pub</span></li><li><span style="font-weight: bold;">Set up your app to use Git (if you aren't already using it): $ cd myapp $ git init $ git add . $ git commit -m "first commit".</span></li><li><span style="font-weight: bold;">Create an app: $ heroku create --remote Created http://sharp-autumn-42.com/ | git@adam.herokudev.com:sharp-autumn-42.git Git remote heroku added</span><br /></li></ol><ul><li>After you finish oooing and aahing, try reading the docs.</li><li>Deploy your code: $ git push heroku master</li><li>Run migrations (or other bootstrap tasks): $ heroku rake db:migrate</li><li>Open the deployed app in your browser: $ heroku open Win! </li><li>Creater Interview: <a href="http://rubylearning.com/blog/2009/03/13/interview-adam-wiggins-on-heroku/">http://rubylearning.com/blog/2009/03/13/interview-adam-wiggins-on-heroku/</a></li><li><a href="http://blog.heroku.com/archives/2009/3/10/gem_manifests/">http://blog.heroku.com/archives/2009/3/10/gem_manifests/</a><br /></li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-34508046616616749172009-03-05T09:07:00.000-08:002009-03-20T08:24:42.873-07:00Chapter 38: JRuby Blogs<ul><li><a href="http://www.blogger.com/post-edit.g?blogID=453674908286179212&postID=3450804661661674917#%20http://blog.headius.com/2009/02/jruby-12-coping-with-bugs.html">http://blog.headius.com/2009/02/jruby-12-coping-with-bugs.html</a></li><li><a href="http://blog.headius.com/2009/02/help-us-set-priorities-for-jruby-13.html">http://blog.headius.com/2009/02/help-us-set-priorities-for-jruby-13.html</a></li><li>@tom_enebo: Example of yesterdays rspec adventure for JRubyParser: <a href="http://gist.github.com/82062">http://gist.github.com/82062</a> . Thanks to @nicksieger for a little hand-holding.<br /></li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0tag:blogger.com,1999:blog-453674908286179212.post-28918056077731298752009-03-03T17:16:00.001-08:002009-03-04T13:39:52.167-08:00Chapter 37: Flash-Watir Unit Testing FlashWatir Unit Testing based on GoogleCode code<ul><li>Looks at Flash-Watir's GoogleCode web site and printed out several pages.</li><li>Then I downloaded the subversion repository:<br /></li><li>$ svn checkout http://flash-watir.googlecode.com/svn/trunk/ flash-watir-read-only<br />A flash-watir-read-only/test<br />A flash-watir-read-only/test/test_flash_watir.rb<br />A flash-watir-read-only/README.rb<br />A flash-watir-read-only/History.rb<br />A flash-watir-read-only/License.rb<br />A flash-watir-read-only/flash_watir.gemspec<br />A flash-watir-read-only/lib<br />A flash-watir-read-only/lib/flash_watir<br />A flash-watir-read-only/lib/flash_watir/flash.rb<br />A flash-watir-read-only/lib/flash_watir/container.rb<br />A flash-watir-read-only/lib/flash_watir/script_utils.rb<br />A flash-watir-read-only/lib/flash_watir.rb<br /></li><li><a href="#%20http://www.robertnyman.com/2009/03/02/adobe-flash-pros-and-cons/">http://www.robertnyman.com/2009/03/02/adobe-flash-pros-and-cons/<br /></a></li></ul>Anonymoushttp://www.blogger.com/profile/09590053609883904011noreply@blogger.com0