Posts

Showing posts with the label Rails Library

issue while installing rails_admin gem in ruby on rails

if we get the error while installing rails_admin for the error lib/rails_admin/config/fields/types.rb:11:in `load': Unsupported field datatype: binary (RuntimeError) we have to follow below code in config/initializers/rails_admin.rb since I don't display the binary field I put this monkey patch in my initializer: module RailsAdmin module Config module Fields module Types def self . load ( type ) return @@registry [ :text ] if ( type . to_sym == :binary ) @@registry [ type . to_sym ] or raise "Unsupported field datatype: #{ type } " end end end end end

Admin Interfaces for Rails Apps: RailsAdmin vs ActiveAdmin

The complete article is on http://batsov.com/articles/2011/11/20/admin-interfaces-for-rails-apps-railsadmin-vs-activeadmin/

Ruby on Rails Devise gem controller overrides and set routes for multiple controllers

In my ROR project I have overrides two controllers 1)registeration controller 2)session controller while setting routes for these In my routes.rb file I specified like this devise_for :users, :controllers => { :registrations => "registrations" } devise_for :users, :controllers => {:sessions => "sessions" } In above way It is not taking session controller by default it is going to Devise::sessionController just changed the routes in below way devise_for :users, :controllers => { :registrations => "registrations",:sessions => "sessions" } It is working fine.

How Do I Create And Publish My First Ruby Gem?

Link: http://rubylearning.com/blog/how-do-i-create-and-publish-my-first-ruby-gem/ (sent via Shareaholic-Publishers) ---- What's a Ruby Gem? To solve various problems with Ruby, you might develop your own libraries. Also, you might want to open-source your libraries to get help from the Ruby community and have many developers working on the same. A gem is a packaged Ruby application or library. RubyGems is the st

rvm(Ruby version management) guide

RVM guide Please go follow the below url for documentation. http://beginrescueend.com/rvm/basics/

pre-requisites for refinerycms

-- ##########################Total ROR with Refinerycms######################## #########   Prerequesits For Refinerycms project work ##### 1)-- Install Ruby    ---- This is for Redhat Linux system Follow the steps told in :- http://www.redhat.com/magazine/025nov06/features/ruby/ 2)-- Install Ruby Gems run the command in command line given below   1)gem update system above command will install gem package from rempte repositery   3)-- Installing Rails framework run the below commands    1)gem install rails above command will install the rails framewok and rdoc of rails successfully 4)-- Install one of the database and its gems     By Default sqlite3 is used   for other you should ensure thet that database is already running   if not install first than install related gem from remote repositery for that run command  1)gem install gem_name  ex:- gem install mysql -heroku 5)-- check that ImageMagick is installed    In Linux, it is installed by default checkit by the command    1)i...

Blog view modification in Ruby On Rails

Yes, if you clone RefineryCMS and then clone the blog engine inside vendor/engines/ then you should be fine (ve.g. you'd end up with vendor/engines/refinerycms-blog/ ) Make sure you tell it the new location of the blog engine once you have it pulled locally though.. e.g.     gem 'refinerycms-blog', :path => 'vendor/engines/refinerycms-blog' Or you could install both per normal and run these tasks: rake refinery:override view=**/* rake refinery:override controller=**/* rake refinery:override model=**/* Though that way will just copy the files wherever which may be a disadvantage.

Blog creation in Ruby On Rails

Hello. I use Rails 3. I installed 'refinerycms-blog': 1.) In a Gemfile: gem 'refinerycms-blog', '~> 1.0.rc15' 2.) bundle install 3.) rails generate refinery_blog 4.) rake db:migrate It works very good, but if I go to any post page - I see HTML tags and content. I deployed my project to heroku, where you can see it. http://russlteam.heroku.com/blog/ You can see this problem in a each post in a blog. For example: http://localhost:3000/blog/mysql-for-beginners