Permalink
Browse files

minor edits

  • Loading branch information...
1 parent b21de0c commit 4b1eba2332b786397a7b86c1f62a39b57816f8bb @smtalim smtalim committed with Feb 20, 2012
Showing with 7 additions and 22 deletions.
  1. +1 −16 chapter1.html
  2. +4 −4 chapter5.html
  3. +2 −2 chapter6.html
View
@@ -505,22 +505,7 @@ <h3>Create an account on Heroku</h3>
<pre>gem install heroku
</pre>
-<p>Next, create a new folder, say <code>rackheroku</code>. Assuming that you have Git installed, open a Bash shell in that folder. You now need to identify yourself to Git (you need to do this only once). With the bash shell still open type in the following:</p>
-<pre>git config --global user.name "Your name here"
-git config --global user.email "Your email id"
-</pre>
-
-<p>Git does not allow accented characters in user name. This will set the info stored when you commit to a Git repository. Git has now been set up.</p>
-
-<p>The first step in using Git is to create your SSH Key. This will be used to secure communications between your machine and other machines, and to identify your source code changes. (If you already have an SSH key for other reasons, you can use it here, there is nothing Git-specific about this.)</p>
-
-<p>To create our ssh key, open a new command window and type:</p>
-<pre>$ ssh-keygen -C "username@email.com" -t rsa
-</pre>
-<p>(with your own email address, of course).</p>
-
-<p>Accept the default key file location. When prompted for a passphrase, make one up and enter it. If you feel confident that your own machine is secure, you can use a blank passphrase, for more convenience and less security. Note where it told you it stored the file. On my Windows box, it was stored in "C:\Documents and Settings\A\.ssh\". Memorize your passphrase carefully. If you forget it, you will NOT be able to recover it.</p>
-<p>Open the public file id_rsa.pub with a text editor. The text in there is your "public SSH key".</p>
+<p>Next, create a new folder, say <code>rackheroku</code>. Assuming that you have Git installed, open a Bash shell in that folder.</p>
<p>Upload your public key (do it only once):</p>
<pre>$ heroku keys:add
View
@@ -329,7 +329,7 @@ <h4>my_app.rb</h4>
<pre># my_app.rb
class MyApp
def call(env)
- [200, {"Content-Type" => "text/html"}, ["Hello Rack Participants"]]
+ [200, {"Content-Type" => "text/html"}, ["Hello Rack Participants from across the globe"]]
end
end
</pre>
@@ -348,7 +348,7 @@ <h4>my_app.rb</h4>
<p>Open a browser window and type the url: <a href="http://localhost:9292/">http://localhost:9292/</a></p>
<p>In your browser window, you should see something like this:</p>
-<pre>Hello Rack Participants
+<pre>Hello Rack Participants from across the globe
</pre>
<p>Press <b>Ctrl-C</b> in the command window to stop the <b>WEBrick</b> server. Close the command window.</p>
@@ -540,7 +540,7 @@ <h2>Rack::Builder</h2>
builder = Rack::Builder.new do
run rack_time
end
-Rack::Handler::WEBrick.run rack_time, :Port => 9292
+Rack::Handler::WEBrick.run builder, :Port => 9292
</pre>
<p><code>Rack::Builder#run</code> specifies the actual rack application you're wrapping with <code>Rack::Builder</code>.</p>
<p>Here <code>Rack::Builder#initialize</code> accepts a block argument, which is evaluated within the context of the newly created instance using <code>instance_eval</code>.</p>
@@ -568,7 +568,7 @@ <h2>Rack::Builder</h2>
Logger.new('rack.log')
run rack_time
end
-Rack::Handler::WEBrick.run rack_time, :Port => 9292
+Rack::Handler::WEBrick.run builder, :Port => 9292
</pre>
<p>We create an explicit logger <code>rack.log</code>. This log file is created in the same folder as <code>config.ru</code> and contains:</p>
<pre># Logfile created on 2011-12-06 13:54:42 +0530 by logger.rb/31641
View
@@ -29,7 +29,7 @@ <h3>Deploy your app to Heroku</h3>
<pre># my_app.rb
class MyApp
def call env
- [200, {"Content-Type" => "text/html"}, ["Hello Rack Participants"]]
+ [200, {"Content-Type" => "text/html"}, ["Hello Rack Participants from across the globe"]]
end
end
</pre>
@@ -97,7 +97,7 @@ <h3>Exercise on deployment</h3>
</strong>
</p>
<div id="footer">
- <p>&copy; 2006-2012&nbsp;<strong>RubyLearning.org - Programming for the Web with Ruby</strong>&nbsp;&nbsp;Page Updated: 21st Jan. 2012</p>
+ <p>&copy; 2006-2012&nbsp;<strong>RubyLearning.org - Programming for the Web with Ruby</strong>&nbsp;&nbsp;Page Updated: 20th Feb. 2012</p>
</div>
</div>

0 comments on commit 4b1eba2

Please sign in to comment.