What does gem mean? [closed] - ruby

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am struggling with the concept gem. What does it mean? On jumpstart tutorial I read this
Steve Klabnik, an instructor for Jumpstart, created the sunlight-congress gem.
http://tutorials.jumpstartlab.com/projects/eventmanager.html
What he really did? Did he created the website? Did he created a gem for a website that is already existed?
What do you do when you say
gem 'sunlight-congress'
Please Make sure I am new to programming and explain it in a simple term. I really thank you for your help

See http://guides.rubygems.org/what-is-a-gem/
a gem is kind of a library in the Ruby world, like a Maven artifact in the java world (namely a jar file with identifier and version information and more)

In Ruby, a gem is nothing but a distributed code packaged as a library created by Ruby developer(s). The idea is to keep a particular functionality of code into a library but Ruby does it more beautifully by letting Ruby developers host it on http://rubygems.org/ and library then can used by others. For more information read: http://guides.rubygems.org/what-is-a-gem/

Related

How to package ruby application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How do you package a ruby app so all the dependencies are already packaged in the app and does not require the user to be messing about with bundler or rvm.
Use "require" for all the dependencies you need in an ordered manner.
However the require only works if the "required" package is installed on the machine. from what I know there is no automated tool .. and how do you know even "ruby" is installed (non-MacOS).
If you don't want user to "mess" with installing anything -- then you have to write a piece of code that checks the presence of dependencies and installs them if needed. .. best is to write the install script in install script/program with bash etc. or in ruby inline with something with try/end syntax.

how to add this github project to use in ruby class [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am learning how to use the data structure in ruby.
I found this library on github : https://github.com/kanwei/algorithms/tree/master.
I have created a word_count.rb file locally.
I want to use the library I mentioned, locally in my ruby class file.
The link I mentioned has following project structure :
how can I use this project in class file ?
It is published as a gem (just the page you found does not document that fact): https://rubygems.org/gems/algorithms
So if you have a Gemfile in your project, add the line:
gem "algorithms", "~> 0.6.1"
Otherwise, run the following command:
gem install algorithms
and use it like you would any other gem, with
require 'algorithms'
in one of your source files.
require 'algorithms'
include Containers
http://kanwei.github.io/algorithms/

Stand alone ruby gem that can be installed in server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to write a ruby gem which will act as a monitoring tool for kannel. download and install in server and start a small worker or something.How i can make this? Iam not asking the script for kannel monitoring but how to make a tool .
RailsCasts has a decent episode on making a gem with Bundler.
Bundler will handle the structure, you just need to write your application. Libraries in the /lib directory, binaries (or scripts you want to be executable) in /bin. Pretty simple!

"Application must run" requirement for Ruby assignment, create gem? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
EDIT: In short, what do I need to do to create a running application in Ruby, do I need to create a gem?
ORIGINAL QUESTION THAT SUCKED:
I've never taken any programming classes, or had assignments before so I'm asking this question in hopes this is clear to someone who has had many programming assignments before.
Basically the instructions state, "The Application must Run."
The instructions on the assignment uploader state that no executable files should be uploaded and the application should be put into a .zip.
For a second I thought I'd just create the app code locally, zip all the files, and upload them, but now I'm second guessing that. It seems like I should create a gem out of my application and then the readme that would be uploaded would instruct them to just install the gem?
Am I on the right track here? I suppose my question can be stated as, I need to create a ruby application that will run, is the best way to do that by creating a gem? Or am I completely over thinking this?
Thank you very much.
The most likely thing is that it means this:
The application must run via executing the command ruby myapp.rb
So it "must run" when you pass the filename of you code to the ruby executable.
Anything else wouldn't make much sense. If you are required to make a gem, that would likely have been explicitly clear. But you should clarify this with your instructor, as there isn't a lot to go on here.

ruby 1.8.7 and web service [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm new to Ruby and want to write a web service using Ruby. Some constraints are:
Ruby 1.8.7
Windows 2008 Server
I found that the Sinatra gem may help. I want to know if there are any other options beside Sinatra.
Sinatra is a very easy-to-use way to go, and what I'd recommend to get your feet wet.
There are other solutions:
Padrino is built on-top of Sinatra, and offers additional functionality, but for your purposes Sinatra is still a more easily accessible way to go as you'll spend less time configuring.
Rails is the heavy-weight solution for Ruby, but if you are just learning the language then I'd recommend Sinatra still. Rails is very powerful but a lot of things it does will seem like magic, though they are actually based on standard Ruby features. So, I think you are still better off learning Ruby and working with Sinatra to get the basics.

Resources