Skip to main content

Posts

Facebook share url in rails

Facebook share url in rails ?   https://www.facebook.com/dialog/feed?app_id=14563499550189 &display=popup&caption=An%20example%20caption&link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2&redirect_uri=https://developers.facebook.com/tools/explorer

Omniauth facebook email id not getting in rails?

Omniauth facebook email id not getting in rails? Better way use the koala api get the email address Steps 1)gem "koala" 2)bundle install 3)Get the request.env['omniauth.auth'] 3)@graph = Koala::Facebook::API.new( request.env['omniauth.auth']['credentials']['token'] ) 4)user_email = @graph.get_object("me?fields=email")

Git branch and basic commands and rails3 to rails4

Rails 3 to Rails 4 Migrations Ruby Version 2.2.2 Rails Version 4.2.3 Modification files 1)Gemfile Latest Gems related versions 2)Routes Change the match method with via get or post 3)Controllers New params creating and updating the data. i)params.require(:person).permit(:name, :age) 4)Models Active Record queries need to change i)Profile.where(“code is not null”) Profile.where.not(code: null) ii)Write the scopes in Models 5)Javascripts,stylesheets,images_paths Move the javascriptfiles and stylesheets to assets folder 6)Facebook,Linkedin,Twitter apis need to change Code changes Latest versions of the API Git Related Commands git branch List of branches for the git git chekout -b newbranc...

Gem::LoadError (Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).?

Gem::LoadError (Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).) In rails? 1)change the gemfile in mysql version  gem 'mysql2' 2)Change to mysql2 version  gem 'mysql2','0.3.20'

What are some GUI clients for Git? (Or) Update the code in git?

What are some GUI clients for Git? git gui  - graphical commit tool, in Tcl/Tk, distributed with Git (usually in  git-gui  package) git-cola  - uses PyQt4 install all git gui tools sudo apt-get update && sudo apt-get install git-all Usage of git Gui 1)Project folder -> git gui 2)add the what are the files need to be commit 3)Add the git commit name 4)git push origin master  git-cola also same as the git gui