-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrails-environment-variables.html
320 lines (318 loc) · 25.8 KB
/
rails-environment-variables.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<!DOCTYPE html>
<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Rails Environment Variables · RailsApps</title>
<meta name="viewport" content="width=device-width">
<link href="https://plus.google.com/117374718581973393536" rel="publisher">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.2.2/css/normalize.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.2.2/css/foundation.min.css">
<link rel="stylesheet" href="http://railsapps.github.io/css/railsapps.css" />
<link rel="stylesheet" href="http://railsapps.github.io/css/syntax.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<script type="text/javascript">
window.analytics=window.analytics||[],window.analytics.methods=["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],window.analytics.factory=function(t){return function(){var a=Array.prototype.slice.call(arguments);return a.unshift(t),window.analytics.push(a),window.analytics}};for(var i=0;i<window.analytics.methods.length;i++){var key=window.analytics.methods[i];window.analytics[key]=window.analytics.factory(key)}window.analytics.load=function(t){if(!document.getElementById("analytics-js")){var a=document.createElement("script");a.type="text/javascript",a.id="analytics-js",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.io/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}},window.analytics.SNIPPET_VERSION="2.0.9",
window.analytics.load("l1stqfqqbf");
window.analytics.page();
window.analytics.ready(function () {
ga('require', 'linker');
ga('linker:autoLink', ['railscomposer.com','learn-rails.com','blog.railsapps.org','tutorials.railsapps.org']);
});
</script>
</head>
<body>
<div class="fixed">
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<a href="http://railsapps.github.io/" class="brand">RailsApps Project</a>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="right">
<li><a href="https://tutorials.railsapps.org/" class="google">Tutorials</a></li>
<li><a href="http://twitter.com/rails_apps" class="twitter">Twitter</a></li>
<li><a href="http://blog.railsapps.org/" class="twitter">Blog</a></li>
<li><a href="https://github.com/RailsApps" class="github">GitHub Repository</a></li>
</ul>
</section>
</nav>
</div>
<div class="row">
<div class="large-12 columns">
<div class="content wikistyle gollum textile">
<h1>Rails Environment Variables</h1>
<h4>by Taylor Mock and Daniel Kehoe</h4>
<p><em>Last updated 15 December 2012</em></p>
<p>Setting Rails environment variables. Using <span class="caps">ENV</span> variables in Rails, locally and with Heroku. Rails configuration and security with environment variables.</p>
<h4>If You Are New to Rails</h4>
<p>If you’re new to Rails, see <a href="http://railsapps.github.io/what-is-ruby-rails.html">What is Ruby on Rails?</a>, the book <a href="http://learn-rails.com/learn-ruby-on-rails.html">Learn Ruby on Rails</a>, and recommendations for a <a href="https://tutorials.railsapps.org/rails-tutorial">Rails tutorial</a>.</p>
<h4><a href="http://railsapps.github.io/"><img src="http://railsapps.github.io/images/join/join-railsapps.png" title="Join RailsApps" alt="Join RailsApps"></a></h4>
<h4>What is the RailsApps Project?</h4>
<p>This is an article from the RailsApps project. The <a href="http://railsapps.github.io/">RailsApps project</a> provides example applications that developers use as starter apps. Hundreds of developers use the apps, report problems as they arise, and propose solutions. Rails changes frequently; each application is known to work and serves as your personal “reference implementation.” Each application is accompanied by a tutorial so there is no mystery code. Support for the project comes from subscribers. Please accept our invitation to <a href="http://railsapps.github.io/">join the RailsApps project</a>.</p>
<h2>Environment Variables</h2>
<p>Many applications require configuration of settings such as email account credentials or <span class="caps">API</span> keys for external services. You can pass local configuration settings to an application using environment variables.</p>
<p>Operating systems (Linux, Mac OS X, Windows) provide mechanisms to set local <a href="http://en.wikipedia.org/wiki/Environment_variable">environment variables</a>, as does <a href="http://www.heroku.com/">Heroku</a> and other deployment platforms. Here we show how to set local environment variables in the Unix shell. We also show two alternatives to set environment variables in your application without the Unix shell.</p>
<h2>Keeping Environment Variables Private</h2>
<p>Remote <a href="http://railsapps.github.io/rails-git.html">git repositories</a> such as <a href="https://github.com/signup/free">GitHub</a> are a place to store and share code. If your project is open source, any developer will have access to your code. You don’t want to share email account credentials or private <span class="caps">API</span> keys with the public. If you’re collaborating on a team with a private git repository, your local settings may not be suitable for all members of the team. In general, you shouldn’t save email account credentials or private <span class="caps">API</span> keys to a shared git repository.</p>
<h2>Gmail Example</h2>
<p>Consider an application that uses Gmail to send email messages. Access to Gmail requires a username and password for access to your Gmail account. In your Rails application, you will need to configure these credentials in the file <strong>config/environments/production.rb</strong>. A portion of the file might look like this:</p>
<pre>
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: "example.com",
authentication: "plain",
enable_starttls_auto: true,
user_name: ENV["GMAIL_USERNAME"],
password: ENV["GMAIL_PASSWORD"]
}
</pre>
<p>You could “hardcode” your Gmail username and password into the file but that would expose it to everyone who has access to your git repository. Instead use the Ruby variable <code>ENV["GMAIL_USERNAME"]</code> to obtain an environment variable. The variable can be used anywhere in a Rails application. Ruby will replace <code>ENV["GMAIL_USERNAME"]</code> with an environment variable.</p>
<p>Let’s consider how to set local environment variables.</p>
<h2>Option One: Set Unix Environment Variables</h2>
<p>If you’re familiar with Unix, you’ve likely had experience setting environment variables. Unix environment variables are typically set in a file that is read when starting an interactive shell (the <strong>~/.bashrc</strong> file for the bash shell).</p>
<p>Are you using a bash shell? Use <code>echo $SHELL</code> to find out. For a bash shell, using the Gmail example, edit the <strong>~/.bashrc</strong> file and add:</p>
<pre>
export GMAIL_USERNAME="[email protected]"
</pre>
<p>You’ll have to open a new shell or restart your terminal application to continue.</p>
<p>It’s important to learn to use the Unix shell if you’re commited to improving your skills as a developer. But troubleshooting shell problems can be difficult, especially when using rvm, the <a href="https://rvm.io/">Ruby Version Manager</a>, or when the application is launched in nonstandard ways.</p>
<p>We’ll show you two alternatives to using the Unix shell that only require a few lines of code in your Rails application to set environment variables. Use one of these alternative approaches when you don’t want to set environment variables in the Unix shell.</p>
<h2>Option Two: Use the Figaro Gem</h2>
<p>The <a href="https://github.com/laserlemon/figaro">figaro gem</a> offers a practical alternative to setting environment variables in the Unix shell.</p>
<p>The gem takes advantage of Ruby’s ability to set environment variables as well as read them. The gem reads a <strong>config/application.yml</strong> file and sets environment variables before anything else is configured in the Rails application.</p>
<p>If you want to use different credentials in development, test, or production environments, the gem will let you specify the different credentials in the <strong>config/application.yml</strong> file. If you’re deploying to Heroku, the gem gives you a rake task that will set all the environment variables on Heroku. The gem also gives you a syntax to access the environment variables as Figaro method calls which can be useful in setting up tests.</p>
<p>The figaro gem makes it so easy to set configuration variables you may find it useful to set other configuration parameters besides email account credentials or private <span class="caps">API</span> keys.</p>
<p>Here’s how to use it. In your <strong>Gemfile</strong>, add:</p>
<pre>
gem 'figaro'
</pre>
<p>and run <code>$ bundle install</code>.</p>
<p>The gem provides a generator:</p>
<pre>
$ bundle exec figaro install
</pre>
<p>The generator creates a <strong>config/application.yml</strong> file and modifies the <strong>.gitignore</strong> file to prevent the file from being checked into a git repository.</p>
<p>You can add environment variables as key/value pairs to <strong>config/application.yml</strong>:</p>
<pre>
GMAIL_USERNAME: Your_Username
</pre>
<p>The environment variables will be available anywhere in your application as <span class="caps">ENV</span> variables:</p>
<pre>
ENV["GMAIL_USERNAME"]
</pre>
<p>This gives you the convenience of using the same variables in code whether they are set by the Unix shell or the figaro gem’s <strong>config/application.yml</strong>. Variables in the <strong>config/application.yml</strong> file will override environment variables set in the Unix shell.</p>
<p>In tests or other situations where <span class="caps">ENV</span> variables might not be appropriate, you can access the configuration values as Figaro method calls:</p>
<pre>
Figaro.env.gmail_username
</pre>
<p>Use this syntax for setting different credentials in development, test, or production environments:</p>
<pre>
HELLO: world
development:
HELLO: developers
production:
HELLO: users
</pre>
<p>In this case, <code>ENV["HELLO"]</code> will produce “developers” in development, “users” in production and “world” otherwise.</p>
<p>Figaro provides a rake task to set the environment variables in the <strong>config/application.yml</strong> file as Heroku environment variables:</p>
<pre>
rake figaro:heroku
</pre>
<p>If you’re using one of the <a href="http://railsapps.github.io/">RailsApps example applications</a> or you have generated a starter application using the <a href="http://railsapps.github.io/rails-composer/">Rails Composer</a> tool, you’ll find a file named <strong>config/application.yml</strong>. This file was added by the figaro gem and contains key/value entries for each environment variable you may need. Each entry is commented out. Remove the comment character if you want to override environment variables from the Unix shell or set the environment variables using the <strong>config/application.yml</strong> file.</p>
<h2>Option Three: Use a <em>local_env.yml</em> File</h2>
<p>Like the <a href="https://github.com/laserlemon/figaro">figaro gem</a>, this technique takes advantage of Ruby’s ability to set environment variables as well as read them. The figaro gem has additional features and we recommend it. However, if you want to understand how to set environment variables from within your Rails application, or you don’t want to add the figaro gem to your application, you may want to consider this implementation.</p>
<p>We’ll create a simple file that contains key/value pairs for each environment variable using the standard <span class="caps">YAML</span> file format. We’ll make sure this file is listed in the <strong>.gitignore</strong> file so it isn’t checked into the git repository. And we’ll add some code to the <strong>config/application.rb</strong> to read the file and set the environment variables before anything else is configured in the Rails application.</p>
<h3>The <em>local_env.yml</em> File</h3>
<p>Create a file <strong>config/local_env.yml</strong>:</p>
<pre>
# Rename this file to local_env.yml
# Add account settings and API keys here.
# This file should be listed in .gitignore to keep your settings secret!
# Each entry gets set as a local environment variable.
# This file overrides ENV variables in the Unix shell.
# For example, setting:
# GMAIL_USERNAME: 'Your_Gmail_Username'
# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
GMAIL_USERNAME: 'Your_Gmail_Username'
</pre>
<h3>Set .gitignore</h3>
<p>If you have created a git repository for your application, your application root directory should contain a file named <strong>.gitignore</strong> (it is a hidden file). Be sure your <strong>.gitignore</strong> file contains:</p>
<pre>
/config/local_env.yml
</pre>
<p>This prevents the <strong>config/local_env.yml</strong> file from being checked into a git repository and made available for others to see.</p>
<h3>Rails Application Configuration File</h3>
<p>Rails provides the <strong>config/application.rb</strong> file for specifying settings for various Rails components. We want to set our environment variables before any other settings. Rails provides a <code>config.before_configuration</code> method to do so. See the RailsGuide <a href="http://guides.rubyonrails.org/configuring.html">Configuring Rails Applications</a> for more.</p>
<p>Find the following code at the end of the <strong>config/application.rb</strong> file:</p>
<pre>
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
</pre>
<p>and add this code after it:</p>
<pre>
config.before_configuration do
env_file = File.join(Rails.root, 'config', 'local_env.yml')
YAML.load(File.open(env_file)).each do |key, value|
ENV[key.to_s] = value
end if File.exists?(env_file)
end
</pre>
<p>The code opens the <strong>config/local_env.yml</strong> file, reads each key/value pair, and sets environment variables.</p>
<p>The code only runs if the file exists. If the file exists, the code overrides <span class="caps">ENV</span> variables set in the Unix shell. If you prefer to set environment variables in the Unix shell, don’t create the <strong>config/local_env.yml</strong> file.</p>
<h3>Using Environment Variables</h3>
<p>Use <code>ENV["GMAIL_USERNAME"]</code> anywhere in a Rails application. Your application won’t know if it was loaded from the <strong>config/local_env.yml</strong> file or from the Unix shell.</p>
<h3>Distinguishing Development From Test Environments</h3>
<p>Occasionally you’ll want to use different account credentials or <span class="caps">API</span> keys for test and development environments.</p>
<p>Give the variables different names, for example:</p>
<pre>
GMAIL_USERNAME_DEV: 'Your_Gmail_Username_For_Development'
GMAIL_USERNAME_TEST: 'Your_Gmail_Username_For_Tests'
</pre>
<p>and use the variables conditionally:</p>
<pre>
if Rails.env.development?
config.action_mailer.smtp_settings = {
user_name: ENV["GMAIL_USERNAME_DEV"]
}
end
if Rails.env.test?
config.action_mailer.smtp_settings = {
user_name: ENV["GMAIL_USERNAME_TEST"]
}
end
if Rails.env.production?
config.action_mailer.smtp_settings = {
user_name: ENV["GMAIL_USERNAME"]
}
end
</pre>
<p>This approach works with either the <strong>config/local_env.yml</strong> file or environment variables obtained from the Unix shell.</p>
<h2>Setting Environment Variables on Heroku</h2>
<p><a href="http://www.heroku.com/">Heroku</a> is a popular choice for low cost, easily configured Rails application hosting. See the article <a href="http://railsapps.github.io/rails-heroku-tutorial.html">Heroku and Rails</a> for details.</p>
<p>Heroku provides a simple mechanism for setting environment variables. After creating your Heroku app, set Heroku environment variables to provide the same data your application obtains from your local shell environment.</p>
<p>For example, for Gmail:</p>
<pre>
$ heroku config:add [email protected]
</pre>
<p>If you have <a href="https://devcenter.heroku.com/articles/multiple-environments">multiple environments</a> on Heroku:</p>
<pre>
$ heroku config:add [email protected] --remote staging
</pre>
<p>You can check that everything has been added correctly by running:</p>
<pre>
$ heroku info --app myapp
</pre>
<p>where “myapp” is the name of your Heroku application.</p>
<p>If you are using the figaro gem, just run:</p>
<pre>
rake figaro:heroku
</pre>
<p>Notice that you don’t use the <strong>config/application.yml</strong> file. Your <strong>.gitignore</strong> file should prevent it from getting added to the git repository. It won’t exist when you deploy to Heroku and your application will obtain environment variables from the Heroku configuration table.</p>
<h2>Other Approaches</h2>
<p>There are other approaches to setting environment variables in Rails.</p>
<p>Tammer Saleh suggests a similar approach using the Rails <strong>environment.rb</strong> file in his blog posting, <a href="http://tammersaleh.com/posts/managing-heroku-environment-variables-for-local-development">Managing Heroku environment variables for local development</a>.</p>
<p>Brandon Keepers offers the <a href="https://github.com/bkeepers/dotenv">dotenv</a> Ruby gem that handles loading environment variables in development. The dotenv gem loads environment variables from a <strong>.env</strong> file.</p>
<p><a href="https://github.com/ddollar/foreman">Foreman</a> is a tool for starting and configuring multiple processes in a complex application. Foreman will load environment variables from a <strong>.env</strong> file.</p>
<p>There are numerous gems such as <a href="https://github.com/charlotte-ruby/yettings">yettings</a> that set application configuration variables or other constants from a <span class="caps">YAML</span> file and allow access the to values with a method such as <code>AppConfig.gmail_username</code>. This approach is best used for constants that can be checked into a git repository and are not specific to a particular deployment. Local environment variables are better suited to deployment-specific configuration settings.</p>
<h2 id="comment">Did You Like the Article?</h2>
<p>Was this useful to you? Follow <a href="http://twitter.com/rails_apps">rails_apps</a> on Twitter and tweet some praise. We’d love to know you were helped out by the tutorial.</p>
<p>Any issues? Please leave a comment below.</p>
</div>
<div class="comments" id="comments">
<div class="content wikistyle gollum">
<h2>Comments</h2>
</div>
<p>Is this helpful? Your encouragement fuels the project. Please tweet or add a comment. Couldn't get something to work? For the example apps and tutorials, it's best to open an issue on GitHub so we can help you.</p>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'railsapps'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div><!-- class="comments" -->
</div><!-- class="columns" -->
</div><!-- class="row" -->
<footer class="row">
<div class="large-12 columns">
<div class="row">
<div class="medium-4 large-4 columns">
<dl class="footer_nav">
<dt>RailsApps · Getting Started</dt>
<dd><a href="http://railsapps.github.io/ruby-and-rails.html">Ruby on Rails</a></dd>
<dd><a href="http://railsapps.github.io/what-is-ruby-rails.html">What is Ruby on Rails?</a></dd>
<dd><a href="http://learn-rails.com/learn-ruby-on-rails.html">Learn Ruby on Rails</a></dd>
<dd><a href="https://tutorials.railsapps.org/rails-tutorial">Rails Tutorial</a></dd>
<dd><a href="http://learn-rails.com/ruby-on-rails-tutorial-for-beginners">Ruby on Rails Tutorial for Beginners</a></dd>
<dd><a href="http://railsapps.github.io/installing-rails.html">Install Ruby on Rails</a></dd>
<dd><a href="http://railsapps.github.io/installrubyonrails-mac.html">Install Ruby on Rails - Mac OS X</a></dd>
<dd><a href="http://railsapps.github.io/installrubyonrails-ubuntu.html">Install Ruby on Rails - Ubuntu</a></dd>
<dd><a href="http://railsapps.github.io/rubyonrails-nitrous-io.html">Ruby on Rails - Nitrous.io</a></dd>
<dd><a href="http://railsapps.github.io/updating-rails.html">Update Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-composer/">Rails Composer</a></dd>
<dd><a href="http://railsapps.github.io/">Rails Examples</a></dd>
<dd><a href="http://railsapps.github.io/rails-examples-tutorials.html">Rails Starter Apps</a></dd>
</dl>
</div>
<div class="medium-4 large-4 columns">
<dl class="footer_nav">
<dt>RailsApps · Articles</dt>
<dd><a href="http://railsapps.github.io/rails-authorization.html">Rails Authorization</a></dd>
<dd><a href="http://railsapps.github.io/rails-google-analytics.html">Analytics for Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-heroku-tutorial.html">Heroku and Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-javascript-include-external.html">JavaScript and Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-environment-variables.html">Rails Environment Variables</a></dd>
<dd><a href="http://railsapps.github.io/rails-git.html">Git and Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-github.html">Rails GitHub</a></dd>
<dd><a href="http://railsapps.github.io/rails-send-email.html">Send Email with Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-haml.html">Haml and Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-default-application-layout.html">Rails Application Layout</a></dd>
<dd><a href="http://railsapps.github.io/rails-html5-boilerplate.html">HTML5 Boilerplate for Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-3-2-example-gemfile.html">Example Gemfiles for Rails</a></dd>
<dd><a href="http://railsapps.github.io/rails-application-templates.html">Rails Application Templates</a></dd>
<dd><a href="http://railsapps.github.io/rails-product-planning.html">Rails Product Planning</a></dd>
<dd><a href="http://railsapps.github.io/rails-project-management.html">Rails Project Management</a></dd>
</dl>
</div>
<div class="medium-4 large-4 columns">
<dl class="footer_nav">
<dt>RailsApps · Tutorials</dt>
<dd><a href="http://railsapps.github.io/twitter-bootstrap-rails.html">Rails Bootstrap</a></dd>
<dd><a href="http://railsapps.github.io/rails-foundation.html">Rails Foundation</a></dd>
<dd><a href="http://railsapps.github.io/rails-omniauth/">OmniAuth Tutorial</a></dd>
<dd><a href="http://railsapps.github.io/tutorial-rails-devise.html">Rails Devise Tutorial</a></dd>
<dd><a href="http://railsapps.github.io/tutorial-rails-devise-rspec-cucumber.html">Devise RSpec</a></dd>
<dd><a href="http://railsapps.github.io/tutorial-rails-bootstrap-devise-cancan.html">Devise Bootstrap</a></dd>
<dd><a href="http://railsapps.github.io/rails-devise-roles">Role-Based Authorization</a></dd>
<dd><a href="http://railsapps.github.io/rails-devise-pundit">Rails Authorization with Pundit</a></dd>
<dd><a href="https://tutorials.railsapps.org/rails-stripe-membership-saas">Rails Membership Site with Stripe</a></dd>
<dd><a href="https://tutorials.railsapps.org/rails-recurly-subscription-saas">Rails Subscription Site with Recurly</a></dd>
<dd><a href="https://tutorials.railsapps.org/rails-prelaunch-signup">Startup Prelaunch Signup Application</a></dd>
</dl>
<dl class="footer_nav">
<dt>RailsApps Profile</dt>
<dd><a href="https://plus.google.com/108039160165742774777?rel=author">Google</a></dd>
<dd><a href="https://plus.google.com/117374718581973393536" rel="publisher">Find us on Google+</a></dd>
</dl>
</div>
</div>
</div>
</footer>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.2.2/js/foundation.min.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>