<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: ruby</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/ruby/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>Rkhunter /usr/bin/unhide.rb has been replaced by /usr/bin/unhide.rb</title>
      <link>https://chrisjrob.com/2013/07/04/rkhunter-usrbinunhide-rb-has-been-replaced-by-usrbinunhide-rb/</link>
      <pubDate>Thu, 04 Jul 2013 00:00:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2013/07/04/rkhunter-usrbinunhide-rb-has-been-replaced-by-usrbinunhide-rb</guid>
      <description>
       <![CDATA[
         
         <p>I have recently moved over to Rootkit Hunter (rkhunter) instead of using
fcheck, one issue that I encountered on all our Ubuntu servers was the
error:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Warning: The command '/usr/bin/unhide.rb' has been replaced by a script: /usr/bin/unhide.rb: Ruby script
</code></pre></div></div>

<!--more-->

<p>Googling confirmed that this error was normal on Ubuntu systems, but I
found no solution. Fortunately the solution was simple, simply editing
<code class="language-plaintext highlighter-rouge">/etc/rkhunter.conf</code> and adding the following line at the appropriate
place:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SCRIPTWHITELIST=/usr/bin/unhide.rb
</code></pre></div></div>

<p> </p>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Install Ruby on Rails3 on Debian Lenny</title>
      <link>https://chrisjrob.com/2010/11/20/install-ruby-on-rails3-on-debian-lenny/</link>
      <pubDate>Sat, 20 Nov 2010 16:15:40 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2010/11/20/install-ruby-on-rails3-on-debian-lenny</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/debian_logo.png" align="right" alt="Featured Image">
         
         <p>I know nothing about Ruby on Rails, but this is how I ended up successfully (I think!) installing it.  There may be better ways.</p>

<h2 id="download-and-compile-ruby">Download and Compile Ruby</h2>

<p>At the time of writing, the current version is 1.9.2</p>

<ul>
  <li>http://www.ruby-lang.org/en/downloads/</li>
</ul>

<!--more-->

<p>I tend to use checkinstall wherever possible, so that I can manage the package via apt-get and dpkg.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install checkinstall

$ wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
$ tar -xvvzf ruby-1.9.2-p0.tar.gz
$ cd ruby-1.9.2-p0

$ ./configure
$ make
$ sudo checkinstall
</code></pre></div></div>

<p>Set the version number to 1.9.2</p>

<h2 id="install-rails">Install Rails</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo gem install rails
</code></pre></div></div>

<h2 id="install-passenger">Install Passenger</h2>

<p><strong>This assumes you are using apache2.</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo gem install passenger
$ sudo passenger-install-apache2-module
</code></pre></div></div>

<p>Please read thoroughly the output from this the last command, as it will give you the information you require for the next section.</p>

<h2 id="enable-passenger">Enable Passenger</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cd /etc/apache2/mods-available
</code></pre></div></div>

<p>Create or edit the following files, using the output from passenger-install-apache2-module above.</p>

<h3 id="passengerconf">passenger.conf</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&lt;IfModule mod_passenger.c&gt;
    PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.15
    PassengerRuby /usr/local/bin/ruby
&lt;/IfModule&gt;
</code></pre></div></div>

<h3 id="passengerload">passenger.load</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
</code></pre></div></div>

<h3 id="enable-in-apache">Enable in Apache</h3>

<p>You should now be able to enable the apache module with:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo a2enmod passenger
</code></pre></div></div>

<h2 id="update-vhosts">Update Vhosts</h2>

<p>This will vary depending on your system, but you are aiming to have a vhost configuration similar to the following:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&lt;VirtualHost *:80&gt;
    ServerName www.yourhost.com
    DocumentRoot /somewhere/public    # &lt;-- be sure to point to 'public'!
    RailsEnv development              # &lt;-- change to testing/production as appropriate (see note below)
    RackEnv development               # &lt;-- change to testing/production as appropriate (see note below)
    &lt;Directory /somewhere/public&gt;
       AllowOverride all              # &lt;-- relax Apache security settings
       Options -MultiViews            # &lt;-- MultiViews must be turned off
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</code></pre></div></div>

<p>By default, passenger uses the Ruby on Rails production database, which may or may not be appropriate, depending on where you are in the development process.  If you are still developing your rails app, then you may want to set in the above:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>RailsEnv development
RackEnv development
</code></pre></div></div>

<p>In theory you only need the former, but the presence of the file config.ru in your application directory makes passenger require RackEnv instead.</p>

<p>Otherwise, when making changes to your database, do remember to:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># db:migrate RAILS_ENV=production
# touch tmp/restart.txt
</code></pre></div></div>

<p>Otherwise your application will not work.</p>

<h2 id="ispconfig">ISPConfig</h2>

<p>If you are using ISPConfig, then I currently have this working by adding the following to the sites Apache Directives in the admin control panel:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>DocumentRoot /var/www/web11/web/blog/public
&lt;Directory /var/www/web11/web/blog/public&gt;
    AllowOverride all
    Options -MultiViews
&lt;/Directory&gt;
</code></pre></div></div>

<p>And then edit <code class="language-plaintext highlighter-rouge">/etc/apache2/vhosts/Vhosts_ispconfig.conf</code> and remove the old DocumentRoot line from the relevant vhost section.  Unfortunately you will have to do this everytime you change your site configuration.  This is very poor, there has to be a better way.</p>

<h2 id="installing-jquery">Installing JQuery</h2>

<p>These are rather poor notes, you are probably better looking elsewhere, but the key thing is that the long and complex instructions for installing jquery that abound on the Internet should be avoided.  The installation should be a mere couple of commands.</p>

<p>Either type:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ gem install jquery-rails
</code></pre></div></div>

<p>Or as I preferred, edit your Gemfile (in the root of your rails project) and add:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gem 'jquery-rails'
</code></pre></div></div>

<p>My handwritten notes don’t say this, but I believe you would then need to run:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ bundle install
</code></pre></div></div>

<p>And then (add “–ui” on the end of the following command to include the jquery UI):</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ rails generate jquery:install
</code></pre></div></div>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Installing Ruby on Rails</title>
      <link>https://chrisjrob.com/2010/10/18/install-ruby-on-rails/</link>
      <pubDate>Mon, 18 Oct 2010 00:00:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2010/10/18/install-ruby-on-rails</guid>
      <description>
       <![CDATA[
         
         <p>I need a way of creating some quick and dirty web apps for internal use.  To this end, I decided to give Ruby on Rails a try.  Unfortunately it is in heavy development and the Debian packages have not kept up.  I decided to try and install from source, and, after several blind alleys, I ended up with quite a simple installation…</p>

<!--more-->

<h2 id="install-ruby-on-rails3-on-debian-lenny">Install Ruby on Rails3 on Debian Lenny</h2>

<h3 id="warning">Warning</h3>

<p>I know nothing about Ruby on Rails, but this is how I ended up successfully (I think!) installing it.  There may be better ways.</p>

<h3 id="download-and-compile-ruby">Download and Compile Ruby</h3>

<p>At the time of writing, the current version is 1.9.2</p>

<ul>
  <li><a href="http://www.ruby-lang.org/en/downloads/">http://www.ruby-lang.org/en/downloads/</a></li>
</ul>

<p>I tend to use checkinstall wherever possible, so that I can manage the package via apt-get and dpkg.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install checkinstall

$ wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
$ tar -xvvzf ruby-1.9.2-p0.tar.gz
$ cd ruby-1.9.2-p0

$ ./configure
$ make
$ sudo checkinstall
</code></pre></div></div>

<p>Set the version number to 1.9.2</p>

<h3 id="install-rails">Install Rails</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo gem install rails
</code></pre></div></div>

<h3 id="install-passenger">Install Passenger</h3>

<p>N.B. This assumes you are using apache2.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo gem install passenger
$ sudo passenger-install-apache2-module
</code></pre></div></div>

<p>Please read thoroughly the output from this the last command, as it will give you the information you require for the next section.</p>

<h3 id="enable-passenger">Enable Passenger</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cd /etc/apache2/mods-available
</code></pre></div></div>

<p>Create or edit the following files, using the output from passenger-install-apache2-module above.</p>

<h4 id="passengerconf">passenger.conf</h4>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&lt;IfModule mod_passenger.c&gt;
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.15
PassengerRuby /usr/local/bin/ruby
&lt;/IfModule&gt;
</code></pre></div></div>

<h4 id="passengerload">passenger.load</h4>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
</code></pre></div></div>

<h4 id="enable-in-apache">Enable in Apache</h4>

<p>You should now be able to enable the apache module with:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo a2enmod passenger
</code></pre></div></div>

<h3 id="update-vhosts">Update Vhosts</h3>

<p>This will vary depending on your system, but you are aiming to have a vhost configuration similar to the following:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&lt;VirtualHost *:80&gt;
    ServerName www.yourhost.com
    DocumentRoot /somewhere/public    # &lt;-- be sure to point to 'public'!
    RailsEnv development              # &lt;-- change to testing/production as appropriate (see note below)
    RackEnv development               # &lt;-- change to testing/production as appropriate (see note below)
    &lt;Directory /somewhere/public&gt;
        AllowOverride all             # &lt;-- relax Apache security settings
        Options -MultiViews           # &lt;-- MultiViews must be turned off
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</code></pre></div></div>

<p>By default, passenger uses the Ruby on Rails production database, which may or may not be appropriate, depending on where you are in the development process.  If you are still developing your rails app, then you may want to set in the above:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>RailsEnv development
RackEnv development
</code></pre></div></div>

<p>In theory you only need the former, but the presence of the file <code class="language-plaintext highlighter-rouge">config.ru</code> in your application directory makes passenger require RackEnv instead.</p>

<p>Otherwise, when making changes to your database, do remember to:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># db:migrate RAILS_ENV=production
# touch tmp/restart.txt
</code></pre></div></div>

<p>Otherwise your application will not work.</p>

<h3 id="ispconfig">ISPConfig</h3>

<p>If you are using ISPConfig, then I currently have this working by adding the following to the sites Apache Directives in the admin control panel:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>DocumentRoot /var/www/web11/web/blog/public
&lt;Directory /var/www/web11/web/blog/public&gt;
    AllowOverride all
    Options -MultiViews
&lt;/Directory&gt;
</code></pre></div></div>

<p>And then edit <code class="language-plaintext highlighter-rouge">/etc/apache2/vhosts/Vhosts_ispconfig.conf</code> and remove the old DocumentRoot line from the relevant vhost section.  Unfortunately you will have to do this everytime you change your site configuration.  This is very poor, there has to be a better way.</p>

<h3 id="installing-jquery">Installing JQuery</h3>

<p>These are rather poor notes, you are probably better looking elsewhere, but the key thing is that the long and complex instructions for installing jquery that abound on the Internet should be avoided.  The installation should be a mere couple of commands.</p>

<p>Either type:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ gem install jquery-rails
</code></pre></div></div>

<p>Or as I preferred, edit your Gemfile (in the root of your rails project) and add:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gem 'jquery-rails'
</code></pre></div></div>

<p>My handwritten notes don’t say this, but I believe you would then need to run:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ bundle install
</code></pre></div></div>

<p>And then (add <code class="language-plaintext highlighter-rouge">--ui</code> on the end of the following command to include the jquery UI):</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ rails generate jquery:install
</code></pre></div></div>


       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
