<?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>Sean&#039;s Blog &#187; Linux</title>
	<atom:link href="http://seanbehan.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ruby Enterprise Edition and Passenger ./script/console production fails and instead returns Loading production environment (Rails 2.3.5) Rails requires RubyGems &gt;= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org</title>
		<link>http://seanbehan.com/linux/ruby-enterprise-edition-and-passenger-scriptconsole-production-fails-and-instead-returns-loading-production-environment-rails-2-3-5-rails-requires-rubygems-1-3-2-please-install-rubygems-and-t/</link>
		<comments>http://seanbehan.com/linux/ruby-enterprise-edition-and-passenger-scriptconsole-production-fails-and-instead-returns-loading-production-environment-rails-2-3-5-rails-requires-rubygems-1-3-2-please-install-rubygems-and-t/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 14:00:21 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[irb]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[production]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ruby enterprise edition]]></category>
		<category><![CDATA[rubygems]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1211</guid>
		<description><![CDATA[After installing Ruby Enterprise Edition, REE, and Passenger on Ubuntu you may see this error message when you run script/console for the first time ./script/console production # =&#62; Loading production environment (Rails 2.3.5) Rails requires RubyGems &#62;= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org You then scratch your head and run which gem which [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Flinux%2Fruby-enterprise-edition-and-passenger-scriptconsole-production-fails-and-instead-returns-loading-production-environment-rails-2-3-5-rails-requires-rubygems-1-3-2-please-install-rubygems-and-t%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Ruby Enterprise Edition and Passenger ./script/console production fails and instead returns Loading production environment (Rails 2.3.5) Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org" data-url="http://seanbehan.com/linux/ruby-enterprise-edition-and-passenger-scriptconsole-production-fails-and-instead-returns-loading-production-environment-rails-2-3-5-rails-requires-rubygems-1-3-2-please-install-rubygems-and-t/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>After installing Ruby Enterprise Edition, REE, and Passenger on Ubuntu you may see this error message when you run script/console for the first time</p>
<pre class="wp-code-highlight prettyprint">
./script/console production
# =&gt;
Loading production environment (Rails 2.3.5)
Rails requires RubyGems &gt;= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org
</pre>
<p>You then scratch your head and run </p>
<pre class="wp-code-highlight prettyprint">
which gem
which ruby
which rails
</pre>
<p>to find that all appears to be in order. You have rubygems installed , ruby is installed and so is rails. You also find that each are pointing to the correct location, which is something like /usr/bin/gem -> /opt/ruby-enterprise-x.x.x.x/bin/gem, where x.x.x.x is the version of REE. </p>
<p>The problem isn&#8217;t however, with any of the above. The issue is with the location of irb. If you installed (like me) irb with apt-get install irb, then irb isn&#8217;t aware of your shiny new REE and ruby gems. It&#8217;s a simple fix however, unlink irb and symlink the /usr/bin/irb to REE&#8217;s irb like so&#8230;  </p>
<pre class="wp-code-highlight prettyprint">
rm /usr/bin/irb
</pre>
<p>And symlink it to the irb that REE has in bin </p>
<pre class="wp-code-highlight prettyprint">
ln -s /opt/ruby-enterprise-x.x.x.x/bin/irb /usr/bin/irb
</pre>
<p>Now cd into your rails app and run </p>
<pre class="wp-code-highlight prettyprint">
./script/console production
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/linux/ruby-enterprise-edition-and-passenger-scriptconsole-production-fails-and-instead-returns-loading-production-environment-rails-2-3-5-rails-requires-rubygems-1-3-2-please-install-rubygems-and-t/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Many Gigs of RAM Are On My Server?</title>
		<link>http://seanbehan.com/linux/how-many-gigs-of-ram-are-on-my-server/</link>
		<comments>http://seanbehan.com/linux/how-many-gigs-of-ram-are-on-my-server/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 15:53:36 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[gig]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[ram]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1204</guid>
		<description><![CDATA[How much memory is on my linux server? Run the free command free -g total used free shared buffers cached Mem: 2 1 0 0 0 1 -/+ buffers/cache: 0 1 Swap: 3 0 3 Which will tell you memory in Gigs. You can pass other flags, such as, -m or -k, which will give [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Flinux%2Fhow-many-gigs-of-ram-are-on-my-server%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="How Many Gigs of RAM Are On My Server?" data-url="http://seanbehan.com/linux/how-many-gigs-of-ram-are-on-my-server/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>How much memory is on my linux server? Run the free command</p>
<pre class="wp-code-highlight prettyprint">
free -g
 total       used       free     shared    buffers     cached
Mem:             2          1          0          0          0          1
-/+ buffers/cache:          0          1
Swap:            3          0          3
</pre>
<p>Which will tell you memory in Gigs. You can pass other flags, such as, -m or -k, which will give you the number in megs and kilobytes respectively.
</pre>
<p>The man page is as follows</p>
<pre class="wp-code-highlight prettyprint">
man free

FREE(1)                                                                       Linux User's Manual                                                                      FREE(1)

NAME
       free - Display amount of free and used memory in the system

SYNOPSIS
       free [-b | -k | -m | -g] [-o] [-s delay ] [-t] [-V]

DESCRIPTION
       free  displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel.  The shared memory column should be
       ignored; it is obsolete.

   Options
       The -b switch displays the amount of memory in bytes; the -k switch (set by default) displays it in kilobytes; the -m switch displays it in megabytes;  the  -g  switch
       displays it in gigabytes.

       The -t switch displays a line containing the totals.

       The  -o  switch  disables the display of a &quot;buffer adjusted&quot; line.  If the -o option is not specified, free subtracts buffer memory from the used memory and adds it to
       the free memory reported.

       The -s switch activates continuous polling delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for microsecond resolu-
       tion delay times.

       The -V displays version information.

FILES
       /proc/meminfo
              memory information

SEE ALSO
       ps(1), slabtop(1), vmstat(8), top(1)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/linux/how-many-gigs-of-ram-are-on-my-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting Up Users, Permissions and Groups for SSH Access to a Shared Git Repository</title>
		<link>http://seanbehan.com/git/setting-up-permissions-and-groups-for-ssh-access-to-a-shared-git-repository/</link>
		<comments>http://seanbehan.com/git/setting-up-permissions-and-groups-for-ssh-access-to-a-shared-git-repository/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 21:44:37 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[adduser]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[groupadd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[shared]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1189</guid>
		<description><![CDATA[If you are having permission problems using git, such as error: insufficient permission for adding an object to repository database ./objects There are a couple thing you can do to remedy the situation, before moving to a full on git server like gitosis. Create your users and add them to a group. Create (if you [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fsetting-up-permissions-and-groups-for-ssh-access-to-a-shared-git-repository%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Setting Up Users, Permissions and Groups for SSH Access to a Shared Git Repository" data-url="http://seanbehan.com/git/setting-up-permissions-and-groups-for-ssh-access-to-a-shared-git-repository/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>If you are having permission problems using git, such as </p>
<pre class="wp-code-highlight prettyprint">error: insufficient permission for adding an object to repository database ./objects</pre>
<p>There are a couple thing you can do to remedy the situation, before moving to a full on git server like gitosis. </p>
<p>Create your users and add them to a group. Create (if you haven&#8217;t already) your git repo on the server and change permission and ownship and set the git config sharedRepository to true.  </p>
<p>Here are all the commands, quick and dirty!</p>
<pre class="wp-code-highlight prettyprint">
adduser sean
adduser jackson
groupadd developers
adduser sean developers
adduser jackson developers

mkdir -p /git/dev/app.git
cd /git/dev/app.git
git --bare init
vim description  #edit this file (mac os x complains otherwise)
chmod -R g+ws *
chgrp -R developers *
git repo-config core.sharedRepository true
</pre>
<p>Found from: <a href="http://mapopa.blogspot.com/2009/10/git-insufficient-permission-for-adding.html">http://mapopa.blogspot.com/2009/10/git-insufficient-permission-for-adding.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/setting-up-permissions-and-groups-for-ssh-access-to-a-shared-git-repository/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git</title>
		<link>http://seanbehan.com/linux/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/</link>
		<comments>http://seanbehan.com/linux/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 19:25:13 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://bseanvt.wordpress.com/?p=11</guid>
		<description><![CDATA[Here are a list of commands to get up and running with Apache2 with Phussion Passenger for Rails, PHP5, MySQL5, Ruby on Rails with Gems, and the source control software Git. I think that this is a pretty ideal environment for a development box and even production if you need to run apps that are [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Flinux%2Fnew-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git" data-url="http://seanbehan.com/linux/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Here are a list of commands to get up and running with Apache2 with Phussion Passenger for Rails, PHP5, MySQL5, Ruby on Rails with Gems, and the source control software Git. I think that this is a pretty ideal environment for a development box and even production if you need to run apps that are written in both PHP and Ruby.</p>
<p>I&#8217;m using Ubuntu 8, Hardy Heron in this example.</p>
<p>Login to your server as root, sudo su, if you&#8217;re on the box already as another user. You can optionally enter the sudo command before each of the following commands but I don&#8217;t in this example. If you get a permission denied error, try the same command again with sudo in front of it.</p>
<p>The following will update where Ubuntu looks for packages, upgrade to the latest stable build and also install build tools like gcc and make.</p>
<pre class="wp-code-highlight prettyprint">
apt-get update
apt-get upgrade
apt-get install build-essential
</pre>
<p>Now that the server is up to date and has the necessary tools to build and compile the software we&#8217;re about to install, let&#8217;s intstall our basic LAMP (Linux, Apache2, MySQL and PHP) stack. You can list different packages to install sequentialy if you separate them with a space.</p>
<pre class="wp-code-highlight prettyprint">
apt-get install apache2 apache2-prefork-dev
apt-get install mysql-client mysql-server
apt-get install php5 php5-mysql
</pre>
<p>Lets get Ruby installed next. We will want to use Ruby Gems to manage our Ruby packages rather than apt-get. The reason is because apt-get doesn&#8217;t keep up with the latest stable for all Ruby packages and Gems is really a great way to manage Ruby libraries. Think of Ruby Gems as apt-get but for Ruby. Rails for example is a Ruby library that we will download and install using Gems. However, to install Gems we need Ruby and we get Ruby using apt-get.</p>
<pre class="wp-code-highlight prettyprint">
apt-get install ruby ruby1.8-dev libopenssl-ruby ri rdoc
</pre>
<p>This should download and install Ruby with a couple of other packages for documentation and SSL support. To get Gems we need to download either a zip or tgz. The best way and easiest way is to navigate to http://rubyforge.org and search for rubygems(one word).</p>
<p>Here is a link to the exact package that I have downloaded and used for this information.</p>
<pre class="wp-code-highlight prettyprint">

http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
</pre>
<p>However, this could change in the future or when Gems gets an upgrade.</p>
<p>You need to get it on your server. You can either download it to your local machine and ftp or scp it to your remote server or you can use a tool like wget to download directly to your server.</p>
<pre class="wp-code-highlight prettyprint">
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
</pre>
<p>If you don&#8217;t have wget installed, which would be odd, just type apt-get install wget</p>
<p>After it has finished downloading unpack it and cd into it *the name below will be different .</p>
<pre class="wp-code-highlight prettyprint">
tar xzvf &amp;lt;rubygems-dowloaded-file.tgz&amp;gt;
</pre>
<p>After you cd into the folder type</p>
<pre class="wp-code-highlight prettyprint">
ruby setup.rb
</pre>
<p>You&#8217;ll install new Gems with the command gem install package-name. However, now you need to link the program you just downloaded to /usr/bin/gem. The reason is that Gems was installed but with a version number suffix like /usr/bin/gem1.8 or whatever version it&#8217;s at. The reason for this is so that you can switch between different versions of Gems without having to uninstall anything. Just override the old link and you can use the new Gem. So to link the file you&#8217;ll need to find the path that it was installed under, most likely /usr/bin/gem1.8. Once you have the path type in the terminal</p>
<pre class="wp-code-highlight prettyprint">
ln -s /usr/bin/&amp;lt;your gem version&amp;gt; /usr/bin/gem
</pre>
<p>Where &lt;your gem version&gt; is something like gem1.8</p>
<p>Type gem &#8211;version to verify that it works. You&#8217;ll get a readout of the version of the Gem you are using. Next let&#8217;s get it up to date and install the Rails framework. That is two dashes for the system flag below.</p>
<pre class="wp-code-highlight prettyprint">
gem update --system
gem install rails
</pre>
<p>Once that is done we&#8217;ll want to install Phusin Passenger which will let us deploy our Rails application in a similar fashion to any PHP based application. Just point a VirtualHost DocumentRoot to the location of your Rails_Root/public directory and your&#8217;re good to go!</p>
<pre class="wp-code-highlight prettyprint">
gem install passenger
</pre>
<p>Next we&#8217;ll build and compile the module for Apache. This is why we needed to run apt-get install build-essential, installing passenger requires make and gcc development tools. When you execute the next command it will spit a lot of stuff to the screen. This is normal, it is building and linking the module for you. When it is done it will tell you what to copy and paste. I will too, but your configuration could be slightly different. Just follow the prompts that follow.</p>
<pre class="wp-code-highlight prettyprint">
passenger-install-apache2-module
</pre>
<p>Passenger will tell you where to put the configuration options. It will look something like this</p>
<pre class="wp-code-highlight prettyprint">
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.5/ext/apa$
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.5
PassengerRuby /usr/bin/ruby1.8
</pre>
<p>I placed the code above into the /etc/apache2/mods-available/passenger.conf then I linked them to the mods available directory like so ln -s /etc/apache2/mods-available/passenger.conf /etc/apache2/sites-enables/passenger.conf</p>
<p>Next create a VirtualHost</p>
<pre class="wp-code-highlight prettyprint">
&amp;lt;VirtualHost *&amp;gt;
  ServerName awesome.iam.com
  DocumentRoot /var/www/awesome.iam.com/public
  RailsEnv production
&amp;lt;/VirtualHost&amp;gt;
</pre>
<p>Remember to restart your server with</p>
<pre class="wp-code-highlight prettyprint">
apache2ctl restart
</pre>
<p>Also, you restart your Rails application by issuing this command from the Rails_Root dir</p>
<pre class="wp-code-highlight prettyprint">
touch tmp/restart.txt
</pre>
<p>And finally, to install Git</p>
<pre class="wp-code-highlight prettyprint">
apt-get install git git-core
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/linux/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

