Skip to content

Instantly share code, notes, and snippets.

View lrjbrual's full-sized avatar
🏠
Working from home

ryanjeff lrjbrual

🏠
Working from home
View GitHub Profile
@lrjbrual
lrjbrual / Middleman Deploy Error
Created May 19, 2016 19:29
When uploading to git using middleman deploy error can't find gem middleman -cli (>= 0.a)
Need Help, When I tried to deploying the middleman application that I created I got some error here's the details:
➜ rj-profile git:(master) ✗ bundle exec middleman build
/Users/ryanjeff/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems.rb:250:in `find_spec_for_exe': can't find gem middleman
-cli (>= 0.a) (Gem::GemNotFoundException)
from /Users/ryanjeff/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems.rb:278:in `activate_bin_path'
from /Users/ryanjeff/.rbenv/versions/2.3.0/bin/middleman:22:in `<main>'
➜ rj-profile git:(master) ✗ middleman deploy
run middleman build from "."
/Users/ryanjeff/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems.rb:250:in `find_spec_for_exe': can't find gem middleman
@lrjbrual
lrjbrual / solution_robocop_string_interpolation.rb
Last active April 26, 2016 14:01
Solution for Interpolation .to_s ("String") via Robocop
======= Problem with codes using interpolation #{url}====
lapse Offence from Robocop: C: 12: 32: Prefer to_s over string interpolation.
-------------------------
require 'nokogiri'
require 'open-uri'
class Browser
attr_accessor :url
def initialize
<%= render 'friends/lookup' %>
<% if @friendships.size > 0 %>
<table class="table table-striped">
<thead>
<tr>
<th colspan="3" class="page-header">
<h2>My Friends</h2>
</th>
</tr>
<tr>