Tag: ruby-on-rails-4

Gem needs to append column to passed model

I cannot find out how to have my gem append a column to an existing model/table. My gem needs to check the created_at attribute of a model, and based on time passed, set an active column from true to false. I’m assuming that, upon install, it will end up needing a $ rails {gem_name}:install type […]

Use HTML instead of HAML with Ruby on Rails Happy Seed

How can I use html.erb instead of haml when using a rails application that is generated using happy seed?

How to update ruby gem re-readline 5.0 to rb-readline 5.1

I am working on ruby on rails and I want to update gem rb-readline 5.0 to rb-readline 5.1 . I am new in this field and want to know how to update this single gem step by step .Kindly help.

How to make the ruby version match the gemfile

My Ruby on Rails server is failing to execute because of an error that says my ruby version is 2.3.3 but my gemfile is 2.3.1. How do I fix it ?

ruby date difference consolidation

I am working on a project where I have to calculate the total previous expereince of an employee. So lets say an employee worked Company 1 – 11th Feb 2008 to 23rd Feb 2010 Company 2 – 14 May 2010 to 17 Oct 2014 Company 3 – 22 Dec 2014 to 14 Jan 2017 I […]

Add `gem 'sqlite3'` to your Gemfile – Ubuntu

Just started developing in Ruby on Rails. I can’t seem to find any similar issues on Ubuntu on the web. My version of sqlite3 is 1.3.10. I have tried commenting out the sqlite3 from gem file and also updated the bundles. But I am still getting this error. I need sqlite3 in my application but […]

Facebook gem for Rails app

Is there any ruby gem which can be used to see Facebook post in rails app, also allows to post through rails app. I tried this gem http://www.sitepoint.com/ruby-social-gems-facebook/ but it is not showing facebook page post.

Rails 4 gem size

Curious why gem ‘rails’ started to be more than 1 MB from version 4.0. See the difference: 4.0.0.beta1 February 26, 2013 (1.49 MB) 3.2.17 February 18, 2014 (3.5 KB) EDIT: As Chris Gunther found in commit history and wrote below “Commit 6d87cd02 moved the guides from the railties gem to the rails gem.”

Administrate gem raise error

I installed administrate gem. Opened /admin and it raise this error: Invalid CSS after ” alert”: expected “)”, was “: $light-yellow,” (in .rvm/gems/ruby-2.3.0/gems/administrate-0.1.5/app/assets/stylesheets/administrate/application.scss:45) ruby ‘2.3.0’ gem ‘rails’, ‘~> 4.2.0’ gem ‘administrate’, ‘= 0.1.5’ gem ‘sass-rails’, ‘~> 5.0’ gem ‘sass’

regular expression a string

I Need a regular expression which will convert the following object: “{:email=>[\”has already been taken\”], :name=>[\”has already been taken\”]}” to Email has already been taken, Name has already been taken

Ruby is the best programming language in the world - Ruby on Rails.