Im beginner with ruby and rails… Im creating one personal project (to
learn more…) and for this project I need measure something using height
cm
and kg. I saw the uom gem ( GitHub - madriska/uom: Ruby library for physical units of measure and amounts in those units.) that I
think
that make this job, with ActiveRecord Integration.
Could anyone, please, send me some examples or information of how can I
include this gem in one new project and starting to use? Im using rails
3
with ruby 1.9.2
In your project, like anyone you have a file called gem file. Everything
you put there when you type and run bundle install inside your project
folder on terminal will be installed.
To install this particular gem you can read the instructions on github
repo. If this gem has a default installation just add it on gemfile,
something like
gem ‘uom’
In your terminal
Bundle install
It all done!
PS.: I saw that it can be installed as a gem, just as a plugin. So you
can copy the clone repo and type
I couldn’t start my app, after install the plugin. I got the error
bellow…
activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require’:
no
such file to load – activerecord (LoadError)
I opened the dependencies.rb file and I think that the problem is with
the
require, the is some require here that I dont know if they are available
in
my app. How can I check it?
Man, if you read the readme you will figure out that this plugin is out
of date! You can have a talk with Greg brown, he is one of the authors !
Or you can try try by yourself to update it to 3.0 ! I think this is the
problem! Gems are better than plugins cause they can handle with
dependency in a better way!