-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpath---rails-app-rvm-9a8b37b3cf91cb076f06.js
More file actions
2 lines (2 loc) · 3.7 KB
/
path---rails-app-rvm-9a8b37b3cf91cb076f06.js
File metadata and controls
2 lines (2 loc) · 3.7 KB
1
2
webpackJsonp([52604536995652],{510:function(e,n){e.exports={data:{site:{siteMetadata:{title:"Gatsby Starter Blog",author:"Kyle Mathews"}},markdownRemark:{id:"/home/felipe/projects/gatsby-blog/src/pages/rails-app-rvm/index.md absPath of file >>> MarkdownRemark",html:'<p>I wrote this step-by-step to help me remember it next time I create an app.</p>\n<p>It’s my first time experimenting with Rails. I wanted to use a virtual environment from the start because that’s how I learned Python-Django too, and to not be afraid of setting things up.</p>\n<p>This guide might grow as I learn more details of the process. For example, at this point I’m not sure how updates to the system Ruby version would affect the project.</p>\n<p>I’m using Ubuntu 16.10.</p>\n<h3>Install Ruby</h3>\n<h3>Install rvm</h3>\n<h3>Create virtual environment</h3>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ rvm gemset create <name></code></pre>\n </div>\n<h3>Activate virtual environment</h3>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ rvm @<name></code></pre>\n </div>\n<h3>Check which one is being used</h3>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ rvm gemset list\n\ngemsets for ruby-2.4.0 (found in /home/felipe/.rvm/gems/ruby-2.4.0)\n (default)\n global\n=> learn_rails</code></pre>\n </div>\n<h3>Install rails</h3>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ gem install rails</code></pre>\n </div>\n<h2>Check rails</h2>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ rails --version\n\nRails 5.1.X</code></pre>\n </div>\n<h3>Create new app</h3>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ rails new blog\n$ cd blog</code></pre>\n </div>\n<h3>Run server</h3>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ bin/rails server</code></pre>\n </div>\n<h6>I got an error:</h6>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">@learn_rails/gems/bundler-1.15.3/lib/bundler/runtime.rb:85:in `rescue in block (2 levels) in require\': There was an error while trying to load the gem \'uglifier\'. (Bundler::GemRequireError)</code></pre>\n </div>\n<p>A JS runtime was missing. So I went to blog/Gemfile and uncommented line 20:</p>\n<div class="gatsby-highlight">\n <pre class="language-ruby"><code class="language-ruby">gem <span class="token string">\'therubyracer\'</span><span class="token punctuation">,</span> platforms<span class="token punctuation">:</span> <span class="token symbol">:ruby</span><span class="token operator">/</span>\n</code></pre>\n </div>\n<p>Then installed the new gem.</p>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ bundle install\nBundle complete! 17 Gemfile dependencies, 73 gems now installed.\nUse `bundle info [gemname]` to see where a bundled gem is installed.</code></pre>\n </div>\n<p>Now the server ran fine:</p>\n<div class="gatsby-highlight">\n <pre class="language-none"><code class="language-none">$ bin/rails server</code></pre>\n </div>\n<p>Browse to: <a href="http://localhost:3000">http://localhost:3000</a></p>\n<p>All set!</p>',frontmatter:{title:"Creating a Ruby on Rails app with RVM on Ubuntu",date:"August 01, 2017"}}},pathContext:{slug:"/rails-app-rvm/",previous:{fields:{slug:"/portfolio-page/"},frontmatter:{title:"Creating a portfolio page"}},next:!1}}}});
//# sourceMappingURL=path---rails-app-rvm-9a8b37b3cf91cb076f06.js.map