<?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>Steve P. Sharpe</title>
	<atom:link href="http://stevepsharpe.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stevepsharpe.com</link>
	<description>Ruby/Rails/Android</description>
	<lastBuildDate>Mon, 09 Dec 2013 20:40:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6.1</generator>
		<item>
		<title>Loading local environment variables with RSpec</title>
		<link>http://stevepsharpe.com/2013/12/loading-local-environment-variables-rspec/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=loading-local-environment-variables-rspec</link>
		<comments>http://stevepsharpe.com/2013/12/loading-local-environment-variables-rspec/#comments</comments>
		<pubDate>Mon, 09 Dec 2013 20:40:44 +0000</pubDate>
		<dc:creator>Steve Sharpe</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[RSpec]]></category>

		<guid isPermaLink="false">http://stevepsharpe.com/?p=59</guid>
		<description><![CDATA[<p>If like me, you deploy your Rails apps to Heroku, then one of the many benefits are environment variables, which are one of the requirements of developing a twelve-factor app. These are great for keeping your config out of source control. You can also use local environment variables using the dotenv gem. These are stored at the root of [&#8230;]</p><p>The post <a href="http://stevepsharpe.com/2013/12/loading-local-environment-variables-rspec/">Loading local environment variables with RSpec</a> appeared first on <a href="http://stevepsharpe.com">Steve P. Sharpe</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>If like me, you deploy your Rails apps to <a href="http://heroku.com" target="_blank">Heroku</a>, then one of the many benefits are environment variables, which are one of the requirements of developing a <a href="http://www.12factor.net/" target="_blank">twelve-factor app</a>. These are great for keeping your config out of source control.</p>
<p>You can also use local environment variables using the <a href="https://github.com/bkeepers/dotenv" target="_blank">dotenv</a> gem. These are stored at the root of your Rails app in a .env file, make sure you don&#8217;t commit this to source control and you&#8217;re all good. If you use the  <a href="https://github.com/ddollar/foreman" target="_blank">foreman</a> gem, one of it&#8217;s dependencies is the <a href="https://github.com/bkeepers/dotenv" target="_blank">dotenv</a> gem so there is no need to add another line to your Gemfile.</p>
<p>When you add Rspec in to the mix though, it doesn&#8217;t automatically load these local environment variables by default.</p>
<p>This is easily resolved by editing <em>spec/spec_helper.rb</em> and adding the following to the top of the file.</p>
<script src="https://gist.github.com/7879793.js"></script><noscript><pre><code class="language-ruby ruby">require 'dotenv'
Dotenv.load
# the rest of the file continues below...</code></pre></noscript>
<p>The post <a href="http://stevepsharpe.com/2013/12/loading-local-environment-variables-rspec/">Loading local environment variables with RSpec</a> appeared first on <a href="http://stevepsharpe.com">Steve P. Sharpe</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://stevepsharpe.com/2013/12/loading-local-environment-variables-rspec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing New Relic when using PHP-FPM</title>
		<link>http://stevepsharpe.com/2013/09/installing-new-relic-when-using-php-fpm/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-new-relic-when-using-php-fpm</link>
		<comments>http://stevepsharpe.com/2013/09/installing-new-relic-when-using-php-fpm/#comments</comments>
		<pubDate>Sat, 28 Sep 2013 16:06:55 +0000</pubDate>
		<dc:creator>Steve Sharpe</dc:creator>
				<category><![CDATA[devOps]]></category>
		<category><![CDATA[New Relic]]></category>

		<guid isPermaLink="false">http://162.243.30.63/?p=1</guid>
		<description><![CDATA[<p>This blog is hosted on an Ubuntu 12.10 droplet over at Digital Ocean (affiliate link) and uses a LEMP stack, using nginx, instead of Apache,  along with PHP-FPM. We use New Relic extensively where I work and I also wanted to use it on my blog, and why not. Normally installation is super easy, however when trying to install [&#8230;]</p><p>The post <a href="http://stevepsharpe.com/2013/09/installing-new-relic-when-using-php-fpm/">Installing New Relic when using PHP-FPM</a> appeared first on <a href="http://stevepsharpe.com">Steve P. Sharpe</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><img class="size-medium wp-image-44 alignnone" alt="New Relic" src="http://stevepsharpe.com/wp-content/uploads/2013/09/newrelic-logo-square-rgbhex6-300x243.jpg" width="300" height="243" /></p>
<p>This blog is hosted on an Ubuntu 12.10 droplet over at <a href="https://www.digitalocean.com/?refcode=9dcb93609582" target="_blank">Digital Ocean</a> <small><em>(affiliate link)</em></small> and uses a LEMP stack, using nginx, instead of Apache,  along with PHP-FPM.</p>
<p>We use New Relic extensively where I work and I also wanted to use it on my blog, and why not. Normally installation is super easy, however when trying to install New Relic on the brand new droplet it was complaining that it couldn&#8217;t find PHP.  I had already installed PHP via <em>apt-get install php5-fpm, </em>however this alone doesn&#8217;t make PHP available via the command line.<em> </em>In order to install New Relic successfully I had to run <em>apt-get install php5-cli </em>as well. After this, the install continued without a hitch and within a few minutes New Relic was capturing data. Great!</p>
<p>Another step you might like to complete is to monitor your server with New Relic as well, which again, is very easy to set up.<br />
<a href="https://newrelic.com/docs/server/new-relic-for-server-monitoring#installation" target="_blank">Instructions for setting up server monitoring can be found in the docs</a></p>
<p>The post <a href="http://stevepsharpe.com/2013/09/installing-new-relic-when-using-php-fpm/">Installing New Relic when using PHP-FPM</a> appeared first on <a href="http://stevepsharpe.com">Steve P. Sharpe</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://stevepsharpe.com/2013/09/installing-new-relic-when-using-php-fpm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
