[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Please help on gem packaging

Mohammad Khan

12/24/2005 3:42:00 PM

Hello,

First let me show you my gemspec file,

#########################
require 'rubygems'

SPEC = Gem::Specification.new do | s |
# Quick fix for Ruby 1.8.3 / YAML bug
#if (RUBY_VERSION == '1.8.3')
# def spec.to_yaml
# out = super
# out = '--- ' + out unless out =~ /^---/
# out
# end
#end

s.name = "ruby-agi"
s.version = "1.0.0"
s.author = "Mohammad Khan"
s.email = "info@beeplove.com"
s.homepage = "http://www.ruby-agi...
s.platform = Gem::Platform::RUBY
s.summary = "Ruby Language API
for Asterisk"
s.files = [
"README",
"LICENSE",
"INSTALL",
"DOWNLOAD",
"extconf.rb",
"lib/agi.rb",

"lib/command.rb",

"lib/asterisk_variable.rb",
"lib/error.rb",

"lib/return_status.rb",

"examples/call_log.rb"
]
s.require_path = "lib"
s.autorequire = "ruby-agi"
#s.test_file = "test/test.rb"
s.has_rdoc = true
s.extra_rdoc_files = ["README"]
s.required_ruby_version = '>= 1.8.3'
#s.signing_key = '/media/cdrom/gem-private_key.pem'
#s.cert_chain = ['gem-public_cert.pem']
end

if $0 == __FILE__
Gem::manage_gems
Gem::Builder.new(SPEC).build
end

#####################
I could make ruby-agi-1.0.0.gem by executing
gem build <gemspec>

But problem is here:

[beeplove@vpn ruby-agi]$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require_gem 'ruby-agi'
ruby-agi
LoadError: no such file to load -- ruby-agi
from /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:22:in `require__'
from /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:22:in `require'
from /usr/lib/site_ruby/1.8/rubygems.rb:182:in `activate'
from /usr/lib/site_ruby/1.8/rubygems.rb:181:in `activate'
from /usr/lib/site_ruby/1.8/rubygems.rb:37:in `require_gem_with_options'
from /usr/lib/site_ruby/1.8/rubygems.rb:31:in `require_gem'
from (irb):2
irb(main):003:0>

I am not sure, where I am doing wrong. Would anybody please show my mistake
15 Answers

Erik Veenstra

12/24/2005 4:16:00 PM

0

> I am not sure, where I am doing wrong. Would anybody please
> show my mistake

Between building a gem and using that gem, you probably have to
install it.

gegroet,
Erik V. - http://www.erikve...

Mohammad Khan

12/24/2005 5:16:00 PM

0

Ohh yes, I did it by using,
gem install --local ruby-agi-1.0.0.gem
And getting the error posted in my earlier message.
Sorry, forgot to metion this step.


On 12/24/05, Erik Veenstra <pan@erikveen.dds.nl> wrote:
> > I am not sure, where I am doing wrong. Would anybody please
> > show my mistake
>
> Between building a gem and using that gem, you probably have to
> install it.
>
> gegroet,
> Erik V. - http://www.erikve...
>
>
>


Jim Weirich

12/24/2005 6:29:00 PM

0

Mohammad Khan wrote:
> Hello,
>
> First let me show you my gemspec file,
[...]
> s.files = [
> "README",
> "LICENSE",
> "INSTALL",
> "DOWNLOAD",
> "extconf.rb",
> "lib/agi.rb",
> "lib/command.rb",
> "lib/asterisk_variable.rb",
> "lib/error.rb",
> "lib/return_status.rb",
> "examples/call_log.rb"
> s.require_path = "lib"
> s.autorequire = "ruby-agi"
[...]

You autorequire 'ruby-agi', but don't provide a file named 'ruby-agi.rb'
in your lib directory.

I would recommend just dropping the autorequire line. Since modern
versions of RubyGems automatically activates the gems, it is not very
useful.

Your users just need to write:

require 'rubygems'
require 'agi'

No need to invoke require_gem at all (unless you need to specify a
particular version).

--
-- Jim Weirich

--
Posted via http://www.ruby-....


Mohammad Khan

12/30/2005 2:05:00 AM

0

Hi Jim,

Thanks for your help.
Yes, I was not using autorequire correctly.
After looking at couple of other project's gemspec, I understood it better.

Thanks again,
Mohammad



On 12/24/05, Jim Weirich <jim@weirichhouse.org> wrote:
> Mohammad Khan wrote:
> > Hello,
> >
> > First let me show you my gemspec file,
> [...]
> > s.files = [
> > "README",
> > "LICENSE",
> > "INSTALL",
> > "DOWNLOAD",
> > "extconf.rb",
> > "lib/agi.rb",
> > "lib/command.rb",
> > "lib/asterisk_variable.rb",
> > "lib/error.rb",
> > "lib/return_status.rb",
> > "examples/call_log.rb"
> > s.require_path = "lib"
> > s.autorequire = "ruby-agi"
> [...]
>
> You autorequire 'ruby-agi', but don't provide a file named 'ruby-agi.rb'
> in your lib directory.
>
> I would recommend just dropping the autorequire line. Since modern
> versions of RubyGems automatically activates the gems, it is not very
> useful.
>
> Your users just need to write:
>
> require 'rubygems'
> require 'agi'
>
> No need to invoke require_gem at all (unless you need to specify a
> particular version).
>
> --
> -- Jim Weirich
>
> --
> Posted via http://www.ruby-....
>
>


Dave \Crash\ Dummy

6/12/2012 5:18:00 PM

0

On Tue, 12 Jun 2012 08:43:25 -0700 (PDT), KickBoxer GR
<kickboxer861@gmail.com> wrote:
>
>Greece is going through an adjustment period from which it will soon
>emerge.
>
This is laughable. Even the Troika admits that Greece will be in an
economic recession for a decade or more.

KickBoxer GR

6/12/2012 5:25:00 PM

0

> This is laughable. Even the Troika admits that Greece will be in an
> economic recession for a decade or more.

Stop trying to engage me in conversation you Commie punk.

Your support of the criminal Syriza organization with its agenda to
disarm the police and to allow the illegal immigrants currently
residing in Greece to bring their whole family is absolutely
disgusting.

The severely flawed way in which you process and interpret reality
speaks volumes about your mental state. Lingering on this newsgroup
may give you short term relief but it is not a cure.

Dave \Crash\ Dummy

6/12/2012 6:19:00 PM

0

On Tue, 12 Jun 2012 10:25:28 -0700 (PDT), KickBoxer GR
<kickboxer861@gmail.com> wrote:
>
>Your support of the criminal Syriza organization with its agenda to
>disarm the police and to allow the illegal immigrants currently
>residing in Greece to bring their whole family is absolutely
>disgusting.
>
You know full well that I want to see the illegal immigrants massively
deported.

SYRIZA is wrong on this, as it's wrong in its proposals regarding the
police.

Nevertheless, if I were in Greece right now, I would vote for SYRIZA
simply as a means of getting the country off dead center. The legacy
parties, ND and PASOK, are responsible for the trouble the country is
in, and because of that, they need to be thrown into the dustbin of
history.

Now, I'm fairly sure that SYRIZA won't win this Sunday. This means
that there will be a "legacy" government, and the torment of austerity
will continue. Expect massive social unrest this summer.

At least a SYRIZA government would have been a safety valve. Without
that safety valve, the country is primed to explode.

cnntp

6/12/2012 6:39:00 PM

0

? "Alexander Arnakis" <invalid@invalid.invalid> ?????? ??? ??????
news:ecuet7t8frfc95ebmi6139qf8d5luc0c2k@4ax.com...
> On Tue, 12 Jun 2012 08:43:25 -0700 (PDT), KickBoxer GR
> <kickboxer861@gmail.com> wrote:
>>
>>Greece is going through an adjustment period from which it will soon
>>emerge.


> This is laughable. Even the Troika admits that Greece will be in an
> economic recession for a decade or more.

I see...
When the troika says something you diasgree with, then they are talking
bullshit; of course when they say something that you agree with, then it's
valid and good;-)
You can't imagine how ridiculous you are, you little, sad an8rwpaki...

cnntp

6/12/2012 6:43:00 PM

0

? "KickBoxer GR" <kickboxer861@gmail.com> ?????? ??? ??????
news:97616227-5e3d-4653-a9ff-f679f718386f@x21g2000vbc.googlegroups.com...
>> This is laughable. Even the Troika admits that Greece will be in an
>> economic recession for a decade or more.

> Stop trying to engage me in conversation you Commie punk.

This is what exactly this punk wants!
I have received info from US that he's alone and his only "friend" is his
computer...
You don't need to be a psychologist to understand/feel his immense solitude
and desperate need for some kind of communication...
He lives all his life on internet, einai mia 8liberh yparksh...
If he was not such a lowlife, I would even feel sorry for him.

cnntp

6/12/2012 6:49:00 PM

0

? "Alexander Arnakis" <invalid@invalid.invalid> ?????? ??? ??????
news:le1ft7523a2dem1v0a3socj8ogtoqk820u@4ax.com...
> On Tue, 12 Jun 2012 10:25:28 -0700 (PDT), KickBoxer GR
> <kickboxer861@gmail.com> wrote:
>>
>>Your support of the criminal Syriza organization with its agenda to
>>disarm the police and to allow the illegal immigrants currently
>>residing in Greece to bring their whole family is absolutely
>>disgusting.

> You know full well that I want to see the illegal immigrants massively
> deported.

Sure, we know you are inhuman;-)
BTW, why don't you do something to "...deport illegal immigrants..." from
you country, that's US?!...
I suppose you are good in talking empty words but when you are asked to do
something in your own country you have not the balls to act;-)
Typical of bullshiters and COWARDS like you;-)

> SYRIZA is wrong on this, as it's wrong in its proposals regarding the
> police.
>
> Nevertheless, if I were in Greece right now, I would vote for SYRIZA
> simply as a means of getting the country off dead center. The legacy
> parties, ND and PASOK, are responsible for the trouble the country is
> in, and because of that, they need to be thrown into the dustbin of
> history.
>
> Now, I'm fairly sure that SYRIZA won't win this Sunday. This means
> that there will be a "legacy" government, and the torment of austerity
> will continue. Expect massive social unrest this summer.
>
> At least a SYRIZA government would have been a safety valve. Without
> that safety valve, the country is primed to explode.

Good!
So don't come to Greece, those nasty Greeks are out there to get your
ass;-)))
LOL LOL LOL

BTW, it's June and your concubine ADR/Roubini said that he would be in
Greece in June and would like to "teach me a lesson" (jsut like Kasidiaris
did...)!
What happens to this yellow COWARD, is he afraid to come or what?...
Oh, well, you are full of hot aiar, just like the thugs of GD you so much
like;-)