View site on GitHub Statuses Archives

git revert

Revert the last change from git repository but keep your changes to commit:
git reset --soft HEAD~1

Revert the last change from git repository and remove your changes:
git reset --hard HEAD~1

Published on 15/04/2015 at 20h53 by pfonseca, tags

Setting environment variable on MacOSX

Update ~/. bash_profile – create this file if doesn’t exist.

$ vim ~/.bash_profile

export M2_HOME=/Users/pfonseca/apache-maven-3.1.1<br/>
export PATH=$PATH:$M2_HOME/bin<br/>
export JAVA_HOME=$(/usr/libexec/java_home)

Restart the terminal. Test it.

$ echo $M2_HOME

Published on 11/04/2015 at 00h17 by pfonseca, tags

Error to install debugger's gem 1.6.8

When I run $ bundle install command. I got the following error:

vagrant@precise64:/vagrant/vpsa-crediario$ bundle install
Fetching gem metadata from
Fetching additional metadata from
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.5.1
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.9
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.9
Using rack 1.5.2
Using rack-test 0.6.3
Using actionpack 4.1.9
Using mime-types 2.4.3
Using mail 2.6.3
Using actionmailer 4.1.9
Using activemodel 4.1.9
Using arel
Using activerecord 4.1.9
Using annotate 2.6.5
Using thor 0.19.1
Using railties 4.1.9
Using jquery-rails 3.1.2
Using autonumeric-rails 1.9.21
Using bcrypt 3.1.9
Using bootstrap-daterangepicker-rails 0.1.1
Using will_paginate 3.0.7
Using bootstrap-will_paginate 0.0.10
Using uniform_notifier 1.6.2
Using bullet 4.14.0
Using coffee-script-source 1.8.0
Using execjs 2.2.2
Using coffee-script 2.3.0
Using coffee-rails 4.0.1
Using columnize 0.9.0
Using database_cleaner 1.3.0
Using debugger-linecache 1.2.0
Using debugger-ruby_core_source 1.3.7

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/vagrant/.rvm/rubies/ruby-2.0.0-p598/bin/ruby -r ./siteconf20150408-4586-1cwk391.rb extconf.rb 
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
Makefile creation failed
No source for ruby-2.0.0-p598 provided with debugger-ruby_core_source gem.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:

extconf failed, exit code 1

Gem files will remain installed in /home/vagrant/.rvm/gems/ruby-2.0.0-p598/gems/debugger-1.6.8 for inspection.
Results logged to /home/vagrant/.rvm/gems/ruby-2.0.0-p598/extensions/x86_64-linux/2.0.0/debugger-1.6.8/gem_make.out
An error occurred while installing debugger (1.6.8), and Bundler cannot continue.
Make sure that `gem install debugger -v '1.6.8'` succeeds before bundling.

To solve this problem, you need install rails' source code. This command will fix the problem:
$ rvm reinstall 2.0.0 --disable-binary

Then, the command $ bundle install will work.

Published on 08/04/2015 at 04h07 by pfonseca, tags

Swift Update 2014-02-09

  • Constants can now be declared without being initialized in local function scope. They must have a set value before first use. For more information, see Constant Declaration.

  • Constant properties can now only assign a value once in an initializer. For more information, see Assigning Constant Properties During Initialization

  • Multiple optional bindings can now appear in a single if statement as a comma-separated list of assignment expressions. For more information, see Optional Binding.

  • A Optional-Chaining Expression must appear within a postfix expression.

  • Protocol casts are no longer limited to @objc protocols.

  • Type casts that can fail at runtime now use the as? or as! operator, and type casts that are guaranteed not to fail use the as operator. For more information, see Type-Casting Operators.

Published on 10/02/2015 at 10h59 by pfonseca, tags ,

Powered by Publify