pydelion.com

date --date="5 min ago" +%d/%b/%Y:%H:%M

  • en
    • English
    • Français
    • Español
  • Home
  • about
  • contact

Tag Archives: ruby

07 Mar

Disabling error reporting from Sinatra to a browser

To disable error reporting to a browser add next line to your application:

disable :show_exceptions
dandelion Posted in tips ruby, sinatra Leave a comment
25 Feb

Adding Google Analytics to Sinatra application

To add Google Analytics code to Sinatra application there’s a need to install gem rack-google-analytics.

gem install rack-google-analytics

Add this to your app.rb:

require 'rack-google-analytics'
use Rack::GoogleAnalytics, :tracker => 'UA-XXXXXXXX-X'

And restart the app.

dandelion Posted in tips ruby, sinatra Leave a comment
17 Feb

How to fix “make: g++: Command not found”

If you encounter en error:

make: g++: Command not found
make: *** [kb.o] Error 127

while trying to update your Ruby gems on Centos, it means that you don’t have C++ compiler installed. Here’s how to fix it:

yum install gcc-c++
dandelion Posted in tips ruby, tips Leave a comment

Post navigation

Archives

  • May 2022
  • March 2020
  • January 2020
  • December 2019
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • January 2018
  • November 2017
  • August 2017
  • February 2017
  • January 2017
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • March 2015
  • November 2014
  • October 2014
  • August 2014
  • June 2014
  • May 2014
  • September 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013

Meta

  • Log in
Fruitful theme by fruitfulcode Powered by: WordPress
↑