<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Ask! &#187; Ruby</title>
	<atom:link href="http://www.linuxask.com/topics/programming/ruby/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxask.com</link>
	<description>Linux Ask! is a Q &#38; A web site specific for Linux related questions such as how to use common Linux commands.</description>
	<lastBuildDate>Tue, 05 May 2015 07:15:40 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>Constant in Ruby</title>
		<link>http://www.linuxask.com/questions/constant-in-ruby</link>
		<comments>http://www.linuxask.com/questions/constant-in-ruby#comments</comments>
		<pubDate>Thu, 04 Apr 2013 04:41:36 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=4212</guid>
		<description><![CDATA[Constant in Ruby Answer: In Ruby, a class constant has a name starting with an uppercase character, e.g. Foo = 'bar' puts Foo Where you try to re-define the constant, a warning message will be shown, e.g. Foo = 'bar' Foo = '123' (irb):18: warning: already initialized constant Foo<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/define-a-constant-in-php" rel="bookmark" title="Define a constant in PHP">Define a constant in PHP </a></li>
<li><a href="http://www.linuxask.com/questions/install-ruby-in-ubuntu" rel="bookmark" title="Install Ruby in Ubuntu">Install Ruby in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-ruby" rel="bookmark" title="Multi-line string in Ruby">Multi-line string in Ruby </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Constant in Ruby</p>
<p><strong>Answer:</strong></p>
<p>In Ruby, a class constant has a name starting with an uppercase character, e.g.</p>
<pre><code>Foo = 'bar'
puts Foo</code></pre>
<p>Where you try to re-define the constant, a warning message will be shown, e.g.</p>
<pre><code>Foo = 'bar'
Foo = '123'

(irb):18: warning: already initialized constant Foo</code></pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/define-a-constant-in-php" rel="bookmark" title="Define a constant in PHP">Define a constant in PHP </a></li>
<li><a href="http://www.linuxask.com/questions/install-ruby-in-ubuntu" rel="bookmark" title="Install Ruby in Ubuntu">Install Ruby in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-ruby" rel="bookmark" title="Multi-line string in Ruby">Multi-line string in Ruby </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/constant-in-ruby/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Global and Local variable in Ruby</title>
		<link>http://www.linuxask.com/questions/global-and-local-variable-in-ruby</link>
		<comments>http://www.linuxask.com/questions/global-and-local-variable-in-ruby#comments</comments>
		<pubDate>Fri, 29 Mar 2013 04:40:11 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=4208</guid>
		<description><![CDATA[Global and Local variable in Ruby Answer: In Ruby, global variable has a name beginning with $, e.g. $foo = 'bar' puts $foo In contrast, local variable has a name start with a lower case letter or an underscore character, e.g. foo = 'bar' puts foo<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/constant-in-ruby" rel="bookmark" title="Constant in Ruby">Constant in Ruby </a></li>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-ruby" rel="bookmark" title="Multi-line string in Ruby">Multi-line string in Ruby </a></li>
<li><a href="http://www.linuxask.com/questions/install-ruby-in-ubuntu" rel="bookmark" title="Install Ruby in Ubuntu">Install Ruby in Ubuntu </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Global and Local variable in Ruby</p>
<p><strong>Answer:</strong></p>
<p>In Ruby, <strong>global variable </strong> has a name beginning with $, e.g.</p>
<pre><code>$foo = 'bar'
puts $foo</code></pre>
<p>In contrast, <strong>local variable</strong> has a name start with a lower case letter or an underscore character, e.g.</p>
<pre><code>foo = 'bar'
puts foo</code></pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/constant-in-ruby" rel="bookmark" title="Constant in Ruby">Constant in Ruby </a></li>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-ruby" rel="bookmark" title="Multi-line string in Ruby">Multi-line string in Ruby </a></li>
<li><a href="http://www.linuxask.com/questions/install-ruby-in-ubuntu" rel="bookmark" title="Install Ruby in Ubuntu">Install Ruby in Ubuntu </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/global-and-local-variable-in-ruby/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World in different scripting languages</title>
		<link>http://www.linuxask.com/questions/hello-world-in-different-scripting-languages</link>
		<comments>http://www.linuxask.com/questions/hello-world-in-different-scripting-languages#comments</comments>
		<pubDate>Wed, 28 Sep 2011 10:44:11 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3528</guid>
		<description><![CDATA[Print to standard output in different scripting languages Answer: To print a string of "Hello World" to the standard output in different scripting languages 1. Perl print "Hello, World!"; 2. Python print('Hello, World!') 3. PHP echo "Hello, World!"; 4. Ruby puts "Hello, World!"<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-ruby" rel="bookmark" title="Multi-line string in Ruby">Multi-line string in Ruby </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-perform-syntax-check-for-python-program" rel="bookmark" title="How to perform syntax check for Python program">How to perform syntax check for Python program </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-modify-a-single-character-in-a-string-in-python" rel="bookmark" title="How to modify a single character in a string in Python?">How to modify a single character in a string in Python? </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Print to standard output in different scripting languages</p>
<p><strong>Answer:</strong></p>
<p>To print a string of "<strong>Hello World</strong>" to the standard output in different scripting languages</p>
<p><strong>1. Perl<br />
</strong><br />
<code>print "Hello, World!";</code></p>
<p><strong>2. Python<br />
</strong><br />
<code>print('Hello, World!')</code></p>
<p><strong>3. PHP<br />
</strong><br />
<code>echo "Hello, World!";</code></p>
<p><strong>4. Ruby<br />
</strong><br />
<code>puts "Hello, World!"</code></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-ruby" rel="bookmark" title="Multi-line string in Ruby">Multi-line string in Ruby </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-perform-syntax-check-for-python-program" rel="bookmark" title="How to perform syntax check for Python program">How to perform syntax check for Python program </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-modify-a-single-character-in-a-string-in-python" rel="bookmark" title="How to modify a single character in a string in Python?">How to modify a single character in a string in Python? </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/hello-world-in-different-scripting-languages/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List of remote gems on rubyforge.org</title>
		<link>http://www.linuxask.com/questions/list-of-remote-gems-on-rubyforge-org</link>
		<comments>http://www.linuxask.com/questions/list-of-remote-gems-on-rubyforge-org#comments</comments>
		<pubDate>Fri, 01 Jul 2011 17:28:36 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gem]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3156</guid>
		<description><![CDATA[List of remote gems on rubyforge.org Answer: To list all the available gems on rubyforge.org, use this command: # gem list --remote For example, to search for all rails related gems, use # gem list --remote &#124; grep "\-rails"<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/list-all-the-installed-gems" rel="bookmark" title="List all the installed gems">List all the installed gems </a></li>
<li><a href="http://www.linuxask.com/questions/filter-a-list-using-grep-in-perl" rel="bookmark" title="Filter a list using grep in Perl">Filter a list using grep in Perl </a></li>
<li><a href="http://www.linuxask.com/questions/check-remote-hostname-using-nslookup" rel="bookmark" title="Check remote hostname using nslookup">Check remote hostname using nslookup </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>List of remote gems on rubyforge.org</p>
<p><strong>Answer:</strong></p>
<p>To list all the available <strong>gems </strong>on rubyforge.org, use this command:</p>
<p><code># gem list --remote</code></p>
<p>For example, to search for all <strong>rails </strong>related gems, use</p>
<p><code># gem list --remote | grep "\-rails"</code></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/list-all-the-installed-gems" rel="bookmark" title="List all the installed gems">List all the installed gems </a></li>
<li><a href="http://www.linuxask.com/questions/filter-a-list-using-grep-in-perl" rel="bookmark" title="Filter a list using grep in Perl">Filter a list using grep in Perl </a></li>
<li><a href="http://www.linuxask.com/questions/check-remote-hostname-using-nslookup" rel="bookmark" title="Check remote hostname using nslookup">Check remote hostname using nslookup </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/list-of-remote-gems-on-rubyforge-org/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List all the installed gems</title>
		<link>http://www.linuxask.com/questions/list-all-the-installed-gems</link>
		<comments>http://www.linuxask.com/questions/list-all-the-installed-gems#comments</comments>
		<pubDate>Mon, 27 Jun 2011 17:11:52 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gem]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3145</guid>
		<description><![CDATA[List all the installed gems Answer: To list all the installed gems on your machine, simply execute the following command: # gem list --local *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.9) actionpack (3.0.9) activemodel (3.0.9) activerecord (3.0.9) activeresource (3.0.9) activesupport (3.0.9) arel (2.0.10) builder (2.1.2) erubis (2.6.6) i18n (0.5.0) mail (2.2.19) mime-types (1.16) polyglot <a href='http://www.linuxask.com/questions/list-all-the-installed-gems' class='excerpt-more'>[...]</a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/list-of-remote-gems-on-rubyforge-org" rel="bookmark" title="List of remote gems on rubyforge.org">List of remote gems on rubyforge.org </a></li>
<li><a href="http://www.linuxask.com/questions/list-all-the-installed-perl-modules" rel="bookmark" title="List all the installed Perl modules">List all the installed Perl modules </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-check-which-mime-types-are-supported-by-your-debianubuntu" rel="bookmark" title="How to check which mime types are supported by your Debian/Ubuntu">How to check which mime types are supported by your Debian/Ubuntu </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>List all the installed gems</p>
<p><strong>Answer:</strong></p>
<p>To list all the installed <strong>gems </strong>on your machine, simply execute the following command:</p>
<pre><code># gem list --local

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.9)
actionpack (3.0.9)
activemodel (3.0.9)
activerecord (3.0.9)
activeresource (3.0.9)
activesupport (3.0.9)
arel (2.0.10)
builder (2.1.2)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rake (0.9.2)
treetop (1.4.9)
tzinfo (0.3.28)
</code></pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/list-of-remote-gems-on-rubyforge-org" rel="bookmark" title="List of remote gems on rubyforge.org">List of remote gems on rubyforge.org </a></li>
<li><a href="http://www.linuxask.com/questions/list-all-the-installed-perl-modules" rel="bookmark" title="List all the installed Perl modules">List all the installed Perl modules </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-check-which-mime-types-are-supported-by-your-debianubuntu" rel="bookmark" title="How to check which mime types are supported by your Debian/Ubuntu">How to check which mime types are supported by your Debian/Ubuntu </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/list-all-the-installed-gems/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to update RubyGems?</title>
		<link>http://www.linuxask.com/questions/how-to-update-rubygems</link>
		<comments>http://www.linuxask.com/questions/how-to-update-rubygems#comments</comments>
		<pubDate>Fri, 26 Nov 2010 16:08:03 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=2599</guid>
		<description><![CDATA[How to update RubyGems? Answer: To update the the RubyGems installed in Ubuntu, enter the command below: # sudo gem update --systemNow That's it.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/install-rubyonrails-in-ubuntu" rel="bookmark" title="Install RubyOnRails in Ubuntu">Install RubyOnRails in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/update-the-package-index-in-ubuntu" rel="bookmark" title="Update the Package Index in Ubuntu">Update the Package Index in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/install-sun-java-jdk-in-ubuntu-10-04" rel="bookmark" title="Install sun-java-jdk in Ubuntu 10.04">Install sun-java-jdk in Ubuntu 10.04 </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>How to update RubyGems? </p>
<p><strong>Answer:</strong></p>
<p>To update the the RubyGems installed in Ubuntu, enter the command below:</p>
<p><code># sudo gem update --systemNow</code></p>
<p>That's it.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/install-rubyonrails-in-ubuntu" rel="bookmark" title="Install RubyOnRails in Ubuntu">Install RubyOnRails in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/update-the-package-index-in-ubuntu" rel="bookmark" title="Update the Package Index in Ubuntu">Update the Package Index in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/install-sun-java-jdk-in-ubuntu-10-04" rel="bookmark" title="Install sun-java-jdk in Ubuntu 10.04">Install sun-java-jdk in Ubuntu 10.04 </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/how-to-update-rubygems/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install RubyOnRails in Ubuntu</title>
		<link>http://www.linuxask.com/questions/install-rubyonrails-in-ubuntu</link>
		<comments>http://www.linuxask.com/questions/install-rubyonrails-in-ubuntu#comments</comments>
		<pubDate>Wed, 24 Nov 2010 15:52:18 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=2593</guid>
		<description><![CDATA[Install RubyOnRails in Ubuntu Answer: In the last article, we talked how to install Ruby in Ubuntu. Now, we are going to install a very popular web framework for Ruby - RubyOnRails. Firstly, you need to install RubyGems, a gem is a packaged Ruby application or library. # sudo apt-get install rubygems Then, we use <a href='http://www.linuxask.com/questions/install-rubyonrails-in-ubuntu' class='excerpt-more'>[...]</a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/install-ruby-in-ubuntu" rel="bookmark" title="Install Ruby in Ubuntu">Install Ruby in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/install-gd-library-for-php-on-linux" rel="bookmark" title="Install GD Library for PHP on Linux">Install GD Library for PHP on Linux </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-install-ssh-server-in-ubuntu" rel="bookmark" title="How to install SSH server in Ubuntu?">How to install SSH server in Ubuntu? </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Install RubyOnRails in Ubuntu</p>
<p><strong>Answer:</strong></p>
<p>In the last <a href="http://www.linuxask.com/questions/install-ruby-in-ubuntu">article</a>, we talked how to install <strong>Ruby </strong>in Ubuntu. Now, we are going to install a very popular web framework for Ruby - <strong>RubyOnRails</strong>.</p>
<p>Firstly, you need to install <strong>RubyGems</strong>, a <strong>gem </strong>is a packaged Ruby application or library.</p>
<p><code># sudo apt-get install rubygems</code></p>
<p>Then, we use the <strong>gem </strong>command to install <strong>rails</strong>.</p>
<p><code># sudo gem install rails</code></p>
<p>That's all.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/install-ruby-in-ubuntu" rel="bookmark" title="Install Ruby in Ubuntu">Install Ruby in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/install-gd-library-for-php-on-linux" rel="bookmark" title="Install GD Library for PHP on Linux">Install GD Library for PHP on Linux </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-install-ssh-server-in-ubuntu" rel="bookmark" title="How to install SSH server in Ubuntu?">How to install SSH server in Ubuntu? </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/install-rubyonrails-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Ruby in Ubuntu</title>
		<link>http://www.linuxask.com/questions/install-ruby-in-ubuntu</link>
		<comments>http://www.linuxask.com/questions/install-ruby-in-ubuntu#comments</comments>
		<pubDate>Tue, 23 Nov 2010 15:47:09 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=2374</guid>
		<description><![CDATA[Install Ruby in Ubuntu Answer: To install Ruby under Ubuntu, you need to type the commands below: # sudo apt-get install ruby-full build-essential The above command will install more than the Ruby interpreter, but they are useful when you want to play with RubyOnRails later.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/install-rubyonrails-in-ubuntu" rel="bookmark" title="Install RubyOnRails in Ubuntu">Install RubyOnRails in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-install-easy-install-for-python-in-ubuntu" rel="bookmark" title="How to install Easy Install for Python in Ubuntu">How to install Easy Install for Python in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-install-ssh-server-in-ubuntu" rel="bookmark" title="How to install SSH server in Ubuntu?">How to install SSH server in Ubuntu? </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Install Ruby in Ubuntu</p>
<p><strong>Answer:</strong></p>
<p>To install <strong>Ruby </strong>under Ubuntu, you need to type the commands below:</p>
<p><code># sudo apt-get install ruby-full build-essential</code></p>
<p>The above command will install more than the Ruby interpreter, but they are useful when you want to play with RubyOnRails later.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/install-rubyonrails-in-ubuntu" rel="bookmark" title="Install RubyOnRails in Ubuntu">Install RubyOnRails in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-install-easy-install-for-python-in-ubuntu" rel="bookmark" title="How to install Easy Install for Python in Ubuntu">How to install Easy Install for Python in Ubuntu </a></li>
<li><a href="http://www.linuxask.com/questions/how-to-install-ssh-server-in-ubuntu" rel="bookmark" title="How to install SSH server in Ubuntu?">How to install SSH server in Ubuntu? </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/install-ruby-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multi-line string in Ruby</title>
		<link>http://www.linuxask.com/questions/multi-line-string-in-ruby</link>
		<comments>http://www.linuxask.com/questions/multi-line-string-in-ruby#comments</comments>
		<pubDate>Sun, 15 Aug 2010 03:40:02 +0000</pubDate>
		<dc:creator><![CDATA[Linux Ask!]]></dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=2126</guid>
		<description><![CDATA[Multi-line string in Ruby Answer: To declare a multi-line string in Ruby, it is as easy as the following. sql = " SELECT * FROM `user` AS u JOIN `company` AS c ON u.cid = c.id WHERE u.id = 8 " puts sql<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-php" rel="bookmark" title="Multi-line string in PHP">Multi-line string in PHP </a></li>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-perl" rel="bookmark" title="Multi-line string in Perl">Multi-line string in Perl </a></li>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-python" rel="bookmark" title="Multi-line string in Python">Multi-line string in Python </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Multi-line string in Ruby</p>
<p><strong>Answer:</strong></p>
<p>To declare a multi-line string in <strong>Ruby</strong>, it is as easy as the following.</p>
<pre><code>sql = "
        SELECT *
            FROM `user` AS u
            JOIN `company` AS c
                ON u.cid = c.id
             WHERE u.id = 8
"

puts sql
</code></pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-php" rel="bookmark" title="Multi-line string in PHP">Multi-line string in PHP </a></li>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-perl" rel="bookmark" title="Multi-line string in Perl">Multi-line string in Perl </a></li>
<li><a href="http://www.linuxask.com/questions/multi-line-string-in-python" rel="bookmark" title="Multi-line string in Python">Multi-line string in Python </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/multi-line-string-in-ruby/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
