I have three different ways of getting files from other branches.
1) Checkout the file from the other branch
git checkout other-branch app/views/customers/index.html.erb
/blog/index.xml
I have three different ways of getting files from other branches.
git checkout other-branch app/views/customers/index.html.erb
If you are using cloudfront with Heroku, chances are you will encounter some problems if you are using something like font-awesome. I won’t go into the details of how to setup cloudfont, but your heroku passenger should have the following. First, read the Passenger Documentation for Nginx configuration template.
These are the correct steps:
Do this in the root directory of your Rails application.
cp $(passenger-config about resourcesdir)/templates/standalone/config.erb config/passenger_config.erb
Let’s take a very simple Ruby hash with some US state abbreviations to their names
us_states = {
'AK' => 'Alaska',
'AL' => 'Alabama',
'AR' => 'Arkansas',
'AZ' => 'Arizona',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut'
}
I recently ran into this following code in a project that I inherited:
def get_company_doc_file(company_doc)
if Rails.env.development?
company_doc.company_file.path
else
company_doc.company_file.url
end
end
Recently, I have installed browserify-rails
and react-rails
together in the same Ruby on Rails project. This give the best of both worlds since I can still use the react_component
helper provided by react-rails
but use npm to manage my versions of different React.js components. However, if you install react-rails
, make sure you do not run any of the generators.
The relationship between NPM and Node.js is always blurry to me. Whenever I have to upgrade my version of node, I am always a little confused so I’m adding this here for reference:
$ node --version
v5.8.0
If you have recently removed ‘coffee-rails’ from your project and locally, you are getting the error LoadError - cannot load such file -- coffee_script You need to clear the local cache: rake tmp:cache:clear
I add the following to the bottom of my ~/.gitconfig
[alias]
st = status
ci = commit
co = checkout
br = branch --sort=committerdat
Because Google Go (Golang) is not a functional language, it does not include a standard library full of functional utilities like map/filter/all/any. With a little of coding, we accomplish this in a few lines.
I have done a soft launch of a simple Film Festival Calendar, called FilmFestivald. I’ll be adding more features later. This site was built using Ruby on Rails 5 (beta) with slim, coffeescript, jQuery, etc. The first iteration only took a few hours to build. Please email if you have any feedback. We have a simple contact form on the site