jayandra.net.np

11May/120

Setting Up Omniauth-Identity

Process I follow in adding Omniauth-Identity: 1) Add gem in gemfile gem “omniauth-identity” gem ”bcrypt-ruby’, ‘~> 3.0.0? 2) Add initializer omniauth.rb in config Rails.application.config.middleware.use OmniAuth::Builder do provider :identity, :fields => [:name,:email], on_failed_registration: lambda { |env| IdentitiesController.action(:new).call(env) } end 3) Generate necessary models and controllers rails g controller sessions rails g model user provider:string uid:string name:string [...]

Filed under: Uncategorized No Comments
3May/120

Adding custom data attributes to options for select

I have spent lots of time searching for this and hope you too are. i.unit_cost}] }), {},{:class => “ingredient_name”} )%>

Filed under: Uncategorized No Comments
14Apr/120

button for link_to

Want to place a button for link_to??? Replace: <%= link_to ‘New Recipy’, new_recipy_path %> | <%= link_to ‘New Item’, new_item_path %> By: <div class=”link_to_button”> <%= button_to ‘Create New Recipe’, new_recipy_path, { :method => “get”, :class =>”edit_button”} %> <%= button_to ‘Create New Item’, new_item_path, { :method => “get”, :class =>”edit_button”} %> </div> And the associated CSS: [...]

Filed under: Uncategorized No Comments
13Mar/120

Installing oh-my-zsh in ubuntu

I am not sure why installing of oh-my-zsh does not work easily in Ubuntu. I have listed below the steps I had to follow to install oh-my-zsh in my ubuntu 11.10 machine. sudo apt-get install zsh curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sudo sh chsh -s /bin/zsh jayandra ( replace ‘jayandra’ by your ubuntu user ). I [...]

Filed under: Uncategorized No Comments
1Mar/120

twitter-bootstrap and simple-form for scaffold

Found “bootstrap-generators” to be an really awesome gem. It uses simple-form and twitter-bootstrap (scss to less) for generating resources during scaffold.

Filed under: Uncategorized No Comments
5Feb/120

issue with debugger

Are you too getting error “undefined symbol: ruby_current_thread” while starting server with ruby-debug19 gem in the gemfile??? I am not sure if it is Ubuntu specific. Well, after googling for a long time I have finally found a solution. 1) Download newer versions linecache19-0.5.13.gem and ruby-debug-base19-0.11.26.gem from http://rubyforge.org/frs/?group_id=8883 2) Install those 2 gems from the [...]

Filed under: rails No Comments
14Jan/120

Multiple github account on the same computer.

I have to manage two github accounts, one personal and one for my work. But as the same key can not be attached to two different account, I followed the following proceess as a work-around. The default id_rsa.pub key has been attached to my personal account, and I have followed the following process to access [...]

Filed under: rails No Comments
7Nov/111

Love Textmate?

I am sure the major drawback of windows or ubuntu for rails developers is lack of textmate. But do not worry, because a new alternate has just arrived. Please Visit : http://redcareditor.com/ Furthermore, it is open source, available in all platforms (windows, ubuntu, osX), and supports all bundles of textmate. What more do you want???

Filed under: rails, ubuntu 1 Comment
18Sep/110

installing imagemagick ubuntu

Please follow the following easy steps to install imagemagick and rmagick: sudo apt-get update sudo apt-get install imagemagick sudo apt-get install libmagick9-dev (Check image imagemagick by running : identify -version) sudo apt-get install libmagickwand-dev gem install rmagick You are done. No more hassles installing imagemagick/rmagick. The imagemagick and rmagick that got installed following this method [...]

Filed under: rails, ubuntu No Comments
1Sep/111

Utilities after installing Ubuntu

Install Updates in Ubuntu 11.04 The very first thing after install ubuntu 11.04 is to update all the repositories. To do this Just open terminal (Ctrl+Alt+T) and type sudo apt-get update && sudo apt-get upgrade This will do the magic. You have the latest operating system with all updates. Ubuntu restricted extras in Ubuntu 11.04 [...]

Filed under: ubuntu 1 Comment