lsegal` has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
workmad3 has joined #rubygems
arohner has joined #rubygems
arohner_ has joined #rubygems
arohner has quit [Ping timeout: 240 seconds]
arohner_ has quit [Ping timeout: 250 seconds]
workmad3 is now known as wm3|away
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #rubygems
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #rubygems
wm3|away is now known as workmad3
razrunelord has joined #rubygems
razrunelord has quit [Ping timeout: 276 seconds]
arohner has joined #rubygems
arohner has quit [Ping timeout: 255 seconds]
elia has quit [Quit: Computer has gone to sleep.]
razrunelord has joined #rubygems
razrunelord has quit [Ping timeout: 258 seconds]
arohner has joined #rubygems
jpfuentes2 has joined #rubygems
zoraj has quit [Remote host closed the connection]
arohner has quit [Ping timeout: 255 seconds]
tcopeland has quit [Quit: Leaving.]
josh-k has joined #rubygems
razrunelord has joined #rubygems
yo61 has joined #rubygems
<yo61>
Afternoon all
<yo61>
I've got a gem that builds OK on RHEL6 with gem v1.8.23 but does not build on my Mac with gem v2.2.2 (both using ruby 1.9.3)
<yo61>
It fails because it does not find libraries that are in the gem that is being built, ie. they are in ./lib/foo/bar.rb
elia has joined #rubygems
<yo61>
So, it seems that '.' is not in the include path by default
<yo61>
Is there a "right" way to fix this?
razrunelord has quit [Ping timeout: 255 seconds]
<mpapis>
yo61, I think it's difference between ruby 1.8 and 1.9
<mpapis>
yo61, just drop the ./lib/
<yo61>
We have 1.9 on the RHEL box too
<mpapis>
ah I see the 1.9.3 part
<mpapis>
have you tried dropping the ./lib/ part?
<yo61>
What do you mean "drop the ./lib"? That's not actually in any code, that was me saying where the files are in the project dir
<mpapis>
then it should be enough to require "foo/bar"
<yo61>
eg. there are libraries in the project dir in lib/foo/bar and other code in the project has "require 'foo/bar'" but this throws the error with gem 2.2.2 as it can't find foo/bar
<mpapis>
did you load the gem?
<mpapis>
show some examples of what you got ... but anyway I need to leave, maybe someone else can help you with that ... and try in #ruby
<yo61>
Tried there, they suggested here
<yo61>
The problem occurs when building the gem, ie. gem build thing.gemspec
<yo61>
With gem 2.2.2, the libsi n the project dir are not found
<yo61>
* libs in
<yo61>
Works OK with gem 1.8.23
arohner has joined #rubygems
arohner has quit [Ping timeout: 264 seconds]
workmad3 is now known as wm3|away
dwknoxy has joined #rubygems
bbrowning_ is now known as bbrowning
stevenharman has quit [Quit: Leaving...]
stevenharman has joined #rubygems
razrunelord has joined #rubygems
paultingle is now known as paultingle_away
paultingle_away is now known as paultingle
stevenharman has quit [Ping timeout: 240 seconds]
zoraj has joined #rubygems
razrunelord has quit [Ping timeout: 252 seconds]
tcopeland has joined #rubygems
arohner has joined #rubygems
huoxito has joined #rubygems
huoxito has quit [Remote host closed the connection]
<workmad3>
yo61: the error you're getting is that it can't load a file 'wh/puppetfile'... which I'd guess is being required inside that wh/bloodhound file
<workmad3>
yo61: so I'm wondering what is happening inside that file
<mpapis>
then you do not have to give full paths to require
stevenharman has joined #rubygems
<yo61>
Let me try that
<mpapis>
both lines
havenwood has joined #rubygems
<workmad3>
mpapis, yo61: hmm, I doubt that will work...
<workmad3>
the issue seems to be that, on yo61's mac, lib/ isn't on the LOAD_PATH during the gem build
<mpapis>
workmad3, i think it will, $: is LOAD_PATH - this adds lib to LOAD_PATH
<workmad3>
mpapis: oh yeah, so it does
<yo61>
Works
<workmad3>
I misread :)
<mpapis>
:)
<yo61>
Thanks
<mpapis>
yo61, you can use $LOAD_PATH instead of $: - for clarity
<yo61>
Yeah, was going to change to that. Thanks
<workmad3>
yo61: btw, I'm checking the history for rubygems, can't see anything about lib/ ever being added or removed from the load path during gem commands... I'm wondering if you have a RUBY_OPTS or something set on your RHEL server that's doing something like '-> ./lib'
<workmad3>
err, -I even, not ->
<yo61>
No, don't think so
<yo61>
It used to work on my Mac until I upgraded gem ti 2.2.2
razrunelord has joined #rubygems
<workmad3>
hmm
razrunelord has quit [Ping timeout: 252 seconds]
almostwhitehat has joined #rubygems
<workmad3>
no, can't see anything obvious for that change, but I'm only really a user of rubygems
josh-k_ has joined #rubygems
josh-k has quit [Ping timeout: 240 seconds]
arohner has joined #rubygems
josh-k_ has quit [Remote host closed the connection]
josh-k has joined #rubygems
havenwood has quit []
havenwood has joined #rubygems
arohner has quit [Ping timeout: 250 seconds]
josh-k has quit [Ping timeout: 255 seconds]
Emily has quit [Ping timeout: 240 seconds]
elia has quit [Quit: Computer has gone to sleep.]
tbuehlmann has quit [Quit: Leaving]
bbrowning is now known as bbrowning_away
Emily has joined #rubygems
Emily has quit [Ping timeout: 246 seconds]
roidrage has joined #rubygems
Emily has joined #rubygems
Emily has joined #rubygems
Emily has quit [Changing host]
elia has joined #rubygems
guilleiguaran_ has quit [Ping timeout: 252 seconds]
seanlinsley has quit [Quit: seanlinsley]
guilleiguaran_ has joined #rubygems
JSharp has quit [Ping timeout: 246 seconds]
razrunelord has joined #rubygems
ckrailo has quit [Ping timeout: 246 seconds]
yo61 has quit [Ping timeout: 245 seconds]
davidjrice___ has quit [Ping timeout: 252 seconds]
arohner has quit [Remote host closed the connection]
zoraj has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #rubygems
larshaugseth is now known as lhz
rizzatti has quit [Quit: Leaving...]
stevenharman has quit [Quit: Leaving...]
stevenharman has joined #rubygems
stevenharman has quit [Read error: Connection reset by peer]
stevenharman has joined #rubygems
josh-k has joined #rubygems
josh-k has quit [Ping timeout: 240 seconds]
elia has joined #rubygems
cirwin has joined #rubygems
havenwood has quit []
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #rubygems
arohner has joined #rubygems
havenwood has joined #rubygems
stevenharman has quit [Quit: Leaving...]
stevenharman has joined #rubygems
arohner has quit [Ping timeout: 265 seconds]
stevenharman has quit [Quit: Leaving...]
cirwin has left #rubygems [#rubygems]
elia has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #rubygems
luislavena has joined #rubygems
luislavena has quit [Client Quit]
luislavena has joined #rubygems
pothibo has joined #rubygems
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pothibo>
Hey guys I'm building a gem that includes rails and like 9 other gem. If I declare all those gems in my gemspec like spec.add_dependency 'a_gem', my gem is slow as hell at runtime, is there something that could cause slow downs. If I don't specify dependency but requires those gems (Because I had them installed previously) The slowdowns disappear
<luislavena>
pothibo: is your gem a rails gem? or is an application? depending on gems like rails will trigger loading and the loading of its dependencies
<pothibo>
it's an application
<pothibo>
That's the thing, the loading is good if I don't specify the gems in my gemspec
<pothibo>
as soon as I do, my app slows down by like 8-10x
razrunelord has quit [Remote host closed the connection]
<luislavena>
pothibo: so is a rails application? normally you don't distribute rails apps as gem, but you should take a look to something like spree that does that.
<pothibo>
oh gee
<pothibo>
I think I just realized what's going on
<luislavena>
pothibo: I assume "my app slows down" means boot time, correct?
<pothibo>
no, everything
<pothibo>
Well, maybe only boot time
<pothibo>
but I think I'm stupid and I am actually loading rails with all the test and everything
<pothibo>
that's why it slows as hell
havenwood has quit [Remote host closed the connection]
<pothibo>
luislavena Good idea to checkout spree, I was looking at things like devise but forgot about spree thanks
<luislavena>
pothibo: spree is an app, devise is an engine
<pothibo>
they actually do what I was thinking of doing using Gemfile for rails & vendors
<luislavena>
if you're building an engine, the rails generator might provide you better idea on how to define dependencies.
<luislavena>
pothibo: good that is helpful :)
<pothibo>
luislavena yeah, confirmed something I didn't want to be confirmed hehe
<pothibo>
So does Bundler optimize part of rubygems to make things faster? Since it's built on top of it, I'm curious
workmad3 has joined #rubygems
x1337807x has joined #rubygems
arohner has joined #rubygems
<luislavena>
pothibo: not sure to follow: bundler is for define dependencies of applications and a gemspec is to define dependencies of another gem.
<luislavena>
if you build applications, use bundler to define dependencies and will resolve and install them.
<pothibo>
the same way add_dependency works, no?
<luislavena>
if you're building a gem to distribute, then you need to check if you really need to depend on "rails" and not the specific packages.
<luislavena>
no, please see the purpose of the gemfile, again, a gemspec is for building "gems", bundler and Gemfiles are to declare dependencies of applications.
<luislavena>
you can use bundler to manage your gems dependency installation, but things are different.
<luislavena>
if you're building a rails application, you dont need a gemspec
<luislavena>
if you're building an engine for rails, please check the generators on how to indicate the dependencies.
<pothibo>
I think I'm fluent enough in rails/ruby to understand the difference between all of those. The thing is that adding dependency in a gemspec, makes the boot up sequence painfully slow. If I only require the gems I need, but have them installed by hand, things are like 8x faster. I'm wondering why there's such a difference between the 2.
<luislavena>
pothibo: your gem "a" depends on "b", require for "a" will force RubyGems to load "b" before actually works
<luislavena>
that is gem activation
<luislavena>
activating "rails" is like booting the entire rails stack
<luislavena>
because it triggers the other dependencies
<pothibo>
Yes, it will load the modules
<pothibo>
I get that
<luislavena>
then what?
<pothibo>
ok a file has require 'rails/all' on top of it, is it the same as add_dependency 'rails' ?
<pothibo>
Because, if I use the former and do not add an entry in my .gemspec, the console turns on in about 3 seconds, if I add_dependency 'rails' it takes around 20
<luislavena>
you talk about "console", but I don't have code to look and help you out.
<pothibo>
Yeah it's a rails' command
<luislavena>
can you provide a minimal example that shows the error of RubyGems versus probably rails/gem/engine that you're building?
<luislavena>
ok, so let me get it straight
<luislavena>
from within "your application", you're doing "rails console"
<luislavena>
and you've created a gemspec and added it to the Gemfile, correct?
<pothibo>
added 'rails' to the Gemfile, correct
<luislavena>
please note: gemspec != gemfile
<luislavena>
I asked: you added 'rails' to the gemspec
<pothibo>
damn sorry
<pothibo>
hahaha
<pothibo>
gemspec
<luislavena>
and why are you doing that?
<luislavena>
if is a rails application, you don't need a gemspec :/
<luislavena>
rails console will load rails, that is the default behavior
<pothibo>
hahaah i knowwwwwwwwwwwwwwwww
<luislavena>
since it uses bundler, it will require all the dependencies, including the ones defined in the gemspec...
<pothibo>
Hmm, I guess, I should commit my current work and you could see for yourself, o rnot.
<luislavena>
sorry, but I fail to understand what you're trying to achieve and what is the problem, a rails application already depends on rails
<luislavena>
when doing "rails console" you're indeed already booting the app
<luislavena>
you don't need a gemspec on a rails application *unless*, repeating myself, you're building an engine
<luislavena>
which you're not, based on what you said before.
<pothibo>
Yeah I understand that it's not trivial and also we're talking in abstract terms here sicnei you don't have a look at the code
<luislavena>
pothibo: is not that, is much more simpler: why you have a gemspec on a rails *application*
<luislavena>
why you're trying to use a gemspec when you're building a rails application
<pothibo>
Because I want to install my blog engine going into console and doing: 'ecrire new name_of_blog' and then start it doing 'ecrire server' and it will launch my blog with a default theme and all the administration
<pothibo>
So someone who doesn't know rails can launch the blog without learning everything there is to learn with rails
<luislavena>
lol, you're still forcing them to learn gem install and such...
<luislavena>
you
<pothibo>
welp
<pothibo>
gem install ecrire is quite easier to learn than learn all this MVC thingy
<pothibo>
moreover, I'm doing this for me right now as a learning process
<luislavena>
anyhow, depend on other gems will affect how your gems boot
<pothibo>
sure I agree, it's just that requiring them only is MUCH faster then declaring them as dependency in the gemspec
<luislavena>
not sure what is your "ecrire" script looks like, but for it to run RubyGems will activate all the gem dependencies first