restfulie x tokamak

34 views
Skip to first unread message

Bruno Oliveira

unread,
Feb 15, 2011, 5:19:07 PM2/15/11
to restfu...@googlegroups.com
Hi guys, I'm facing with some issues when I try to use restfulie
client. When I try to import restfulie, the exception from tokamak
rises.
I saw that tokamak is using rails 2 (is not too old?), and I couldn't
run unit tests.

I'm have already installed restfulie and tokamak

ruby-1.8.7-p302 :002 > require 'rubygems'
=> true
ruby-1.8.7-p302 :003 > require 'restfulie'
LoadError: no such file to load -- tokamak/errors
from /Users/Bruno/.rvm/gems/ruby-1.8.7-p302@rails3/gems/tokamak-1.1.2/lib/tokamak.rb:14:in
`require'
from /Users/Bruno/.rvm/gems/ruby-1.8.7-p302@rails3/gems/tokamak-1.1.2/lib/tokamak.rb:14
from /Users/Bruno/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`gem_original_require'
from /Users/Bruno/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require'
from /Users/Bruno/.rvm/gems/ruby-1.8.7-p302@rails3/gems/restfulie-1.0.1/lib/restfulie/common.rb:5
from /Users/Bruno/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`gem_original_require'
from /Users/Bruno/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`require'
from /Users/Bruno/.rvm/gems/ruby-1.8.7-p302@rails3/gems/restfulie-1.0.1/lib/restfulie.rb:4
from /Users/Bruno/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`gem_original_require'
from /Users/Bruno/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require'
from (irb):3

--
“Success is having to worry about every damn thing in the world,
except money.” - Johnny Cash
-
-------------------------------------
------Volenti Nihil Difficile------
-------------------------------------

Guilherme Silveira

unread,
Feb 15, 2011, 6:56:20 PM2/15/11
to restfu...@googlegroups.com
Hi Bruno,

I believe tokamak uses rails2 for testing purposes only. "bundle
install" on a "require restfulie" should not end up downloading
rails2. did it download it?
But "bundle instlal" on a tokamak git dir will download it.

The error message says that tokamak/errors was not found.
Thats weird, their gemspec file includes it:
https://github.com/abril/tokamak/blob/master/tokamak.gemspec#L8

Can you provide me the steps to simulate the error?

Regards

Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/

Bruno Oliveira

unread,
Feb 15, 2011, 7:45:48 PM2/15/11
to restfu...@googlegroups.com
Course,

gem install restfulie
gem install tokamak

irb> require 'rubygems'
irb> require 'tokamak' > here the error happens

I'm using ruby-1.8.7 with rails3

Guilherme Silveira

unread,
Feb 16, 2011, 7:58:02 AM2/16/11
to restfu...@googlegroups.com, Bruno Oliveira
Hi Bruno,

I can't reproduce it here... I get a bundler/setup not found, then i
install bundler and everything is fine. Can you try the same steps
with a new gemset environment:

rvm 1.8.7
rvm gemset create test
rvm @test


gem install restfulie
gem install tokamak

echo "require 'rubygems'; require 'tokamak'" > test
irb < test

Then I get:

LoadError: no such file to load -- bundler/setup

So I do:
gem install bundler
irb < test

And it works fine?

Regards


Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/

Bruno Oliveira

unread,
Feb 16, 2011, 8:55:24 AM2/16/11
to Guilherme Silveira, restfu...@googlegroups.com
Ouch Gui, same on me. I created new gemset like you said, the same
error does not happen.

I think that my rubygems version was outdated too.

Thanks a lot

On Wed, Feb 16, 2011 at 10:58 AM, Guilherme Silveira

Guilherme Silveira

unread,
Feb 27, 2011, 8:40:59 AM2/27/11
to restfulie-dev, Donizetti
Hi Bruno and Doni,

You were both with the tokamak issue, I've moved the gemspec
dependencies definition from Rakefile to gemspec and seems like it
corrected for me too (I came across the problem today):
https://github.com/caelum/restfulie/blob/master/Rakefile

Bruno, did I do something nasty with the gemspec now? Should I not
keep those dependencies there?
I have also brought back the design/runtime dependencies separation
(some users told me they need it... and it makes sense, they dont need
sqlite3).

Regards

Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/

Jose Donizetti

unread,
Feb 27, 2011, 10:15:27 AM2/27/11
to restfu...@googlegroups.com, Guilherme Silveira
Hi Gui, I've pulled and it worked just fine for me.
About the dependencies I think there's two way to go.

1 - Let it on the gemspec, so that bundle can find it through the gemspec line on the Gemfile. The issue we were having
is because bundle don't know the dependencies when we run bundle exec rpsec.

2 - Let it on the Rakefile, but duplicate the information to the Gemfile (without using the gemspec line to read).

Bruno is it correct?

Regards,
doni.

Douglas Campos (qmx)

unread,
Feb 27, 2011, 10:33:29 AM2/27/11
to restfu...@googlegroups.com
> 1 - Let it on the gemspec, so that bundle can find it through the gemspec line on the Gemfile. The issue we were having
> is because bundle don't know the dependencies when we run bundle exec rpsec.
thats the preferred way

Guilherme Silveira

unread,
Feb 27, 2011, 11:46:17 AM2/27/11
to restfu...@googlegroups.com, Douglas Campos (qmx)
>> 1 - Let it on the gemspec, so that bundle can find it through the gemspec line on the Gemfile. The issue we were having
>> is because bundle don't know the dependencies when we run bundle exec rpsec.
> thats the preferred way
Right now its contained in gemspec. Is it also soving the dependencies
on bundle exec rake spec? (it does for me)

Python guys, are your tests green with this restfulie ruby release too?

Regards

Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/

Jose Donizetti

unread,
Feb 27, 2011, 12:36:49 PM2/27/11
to restfu...@googlegroups.com, Guilherme Silveira, Douglas Campos (qmx)
Hi gui,

 I'm not having any problem of dependencies, as restfulie is right now.
 Have you changed anything on restfulie-restbuy? Should I run the java tests against it too?

Guilherme Silveira

unread,
Feb 27, 2011, 12:42:51 PM2/27/11
to restfu...@googlegroups.com, Jose Donizetti, Douglas Campos (qmx)
No changes there, but if you remove the current gems and install those
ones you can test it linked with this latest version

Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/

Jose Donizetti

unread,
Feb 27, 2011, 1:11:00 PM2/27/11
to restfu...@googlegroups.com, Guilherme Silveira, Douglas Campos (qmx)
I'm not able to run either client_spec.rb and ClientTest.java, there's an error on the restfulie-restuby application :

NameError (uninitialized constant Expires):
  app/controllers/products_controller.rb:12:in `index'

Bruno Oliveira

unread,
Feb 27, 2011, 3:22:17 PM2/27/11
to restfu...@googlegroups.com, Guilherme Silveira, Donizetti
Hi guys, I believe that gemspec solves the problem like qmx said. This
week, I was reading this post from wycats http://bit.ly/i00fiD about
it.

Gui, I believe that you did right. Doni, about problems with restbuy,
try to run with ruby 1.8.7 and rails 3, and let me know if you have
some problem.

On Sun, Feb 27, 2011 at 10:40 AM, Guilherme Silveira

http://abstractj.com
http://github.com/abstractj
-
Volenti Nihil Difficile

Guilherme Silveira

unread,
Feb 28, 2011, 8:03:21 AM2/28/11
to restfu...@googlegroups.com, Jose Donizetti, Douglas Campos (qmx)
git pull origin master no restfulie-restbuy should fix this Expires error

Great! issue solved!


Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/

On Sun, Feb 27, 2011 at 3:11 PM, Jose Donizetti

Reply all
Reply to author
Forward
0 new messages