unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Help with Ruby: rouge 2.0.7
@ 2017-03-14 22:08 Björn Höfling
  2017-03-15 12:14 ` Ben Woodcroft
  0 siblings, 1 reply; 3+ messages in thread
From: Björn Höfling @ 2017-03-14 22:08 UTC (permalink / raw)
  To: Guix-Help

Hello,

I want to import the Ruby package 'rouge' 2.0.7 into Guix. I'm new to
Ruby, Gem, Rake, etc. and tried the importer with some success. Maybe
someone with more Ruby experience can tell me what's the right way here?

OK, I thought this is an easy one, because it has no dependencies:

https://rubygems.org/gems/rouge/versions/2.0.7

I started with:

guix import gem rouge > rouge.scm

Then added some import headers in the file and tried to build it with

guix build -f rouge.scm -k -K --rounds=2

But it failed:

phase `build' succeeded after 0.4 seconds
starting phase `check'
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)

(See full trace by running task with --trace)
phase `check' failed after 0.1 seconds

Yes, there is no Rakefile in

/tmp/guix-build-ruby-rouge-2.0.7.drv-7/gem/

It seams this is not bundled into the Gem. Also the spec folder is not
there. Is that usual behaviour? If so, is 'guix import gem' the right
way?

If I skip the tests via:

  (arguments
   '(#:tests? #f))

it works. But I want tests. So I tried it with the package from github:

(uri "https://github.com/jneen/rouge/archive/v2.0.7.tar.gz")


It has a Rakefile, but I have to modify the test target name:

(arguments '(#:test-target "spec"))


And I have to add some inputs, although on the RubyGem site, there are
neither dev nor runtime dependencies declared:

  (native-inputs
   `(("ruby-minitest-4" ,ruby-minitest-4)
     ("bundler" ,bundler)))

OK, let's get started:

bjoern@g64 ~/guix [env]$ ./pre-inst-env guix build -f rouge-git.scm
--rounds=2 -k -K

[..]
/gnu/store/6ks5gf4088qd23hac1cbd14aml6h1pgw-bundler-1.14.5/lib/ruby/gems/2.3.0/gems/bundler-1.14.5/lib/bundler/resolver.rb:386:in
`block in verify_gemfile_dependencies_are_found!': Could not find gem
'wrong' in any of the gem sources listed in your Gemfile.
(Bundler::GemNotFound)
from /gnu/store/6ks5gf4088qd23hac1cbd14aml6h1pgw-bundler-1.14.5/lib/ruby/gems/2.3.0/gems/bundler-1.14.5/lib/bundler/resolver.rb:356:in
`each'
[..]

Does that mean that I have to install
'wrong' (https://rubygems.org/gems/wrong) that itself has 5
dependencies, 4 are not in Guix?

What's your Guix/Ruby advice here?

Thanks,

Björn

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help with Ruby: rouge 2.0.7
  2017-03-14 22:08 Help with Ruby: rouge 2.0.7 Björn Höfling
@ 2017-03-15 12:14 ` Ben Woodcroft
  2017-03-17 22:48   ` Björn Höfling
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Woodcroft @ 2017-03-15 12:14 UTC (permalink / raw)
  To: Björn Höfling, Guix-Help

Hello there,


On 15/03/17 08:08, Björn Höfling wrote:
> Hello,
>
> I want to import the Ruby package 'rouge' 2.0.7 into Guix. I'm new to
> Ruby, Gem, Rake, etc. and tried the importer with some success. Maybe
> someone with more Ruby experience can tell me what's the right way here?
>
> OK, I thought this is an easy one, because it has no dependencies:
Unfortunately, as you found, often the dependencies needed for testing 
are sometimes not listed at rubygems.org, since it is not common for 
tests to be run as part of the "gem install" installation process.

> https://rubygems.org/gems/rouge/versions/2.0.7
>
> I started with:
>
> guix import gem rouge > rouge.scm
>
> Then added some import headers in the file and tried to build it with
> [..]
> /gnu/store/6ks5gf4088qd23hac1cbd14aml6h1pgw-bundler-1.14.5/lib/ruby/gems/2.3.0/gems/bundler-1.14.5/lib/bundler/resolver.rb:386:in
> `block in verify_gemfile_dependencies_are_found!': Could not find gem
> 'wrong' in any of the gem sources listed in your Gemfile.
> (Bundler::GemNotFound)
> from /gnu/store/6ks5gf4088qd23hac1cbd14aml6h1pgw-bundler-1.14.5/lib/ruby/gems/2.3.0/gems/bundler-1.14.5/lib/bundler/resolver.rb:356:in
> `each'
> [..]
>
> Does that mean that I have to install
> 'wrong' (https://rubygems.org/gems/wrong) that itself has 5
> dependencies, 4 are not in Guix?
That seems to be the case, unfortunately. There also seems to be some 
other gems in the Gemfile which aren't yet packaged for Guix. There are 
also a number of packages in the wip-rails branch on savannah which 
might be of use - these aren't quite ready yet but if there was interest 
I could finish them off.

If the number of packages needed gets too large, then there may be a 
case for not running the tests in some packages.

Good luck.
ben.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help with Ruby: rouge 2.0.7
  2017-03-15 12:14 ` Ben Woodcroft
@ 2017-03-17 22:48   ` Björn Höfling
  0 siblings, 0 replies; 3+ messages in thread
From: Björn Höfling @ 2017-03-17 22:48 UTC (permalink / raw)
  To: Ben Woodcroft, Guix-Help

Hi Ben,

On Wed, 15 Mar 2017 22:14:06 +1000
Ben Woodcroft <b.woodcroft@uq.edu.au> wrote:

> Hello there,
> 
> 
> On 15/03/17 08:08, Björn Höfling wrote:
> > Hello,
> >
> > I want to import the Ruby package 'rouge' 2.0.7 into Guix. I'm new
> > to Ruby, Gem, Rake, etc. and tried the importer with some success.
> > Maybe someone with more Ruby experience can tell me what's the
> > right way here?
> >
> > OK, I thought this is an easy one, because it has no dependencies:  
> Unfortunately, as you found, often the dependencies needed for
> testing are sometimes not listed at rubygems.org, since it is not
> common for tests to be run as part of the "gem install" installation
> process.
> 
> > https://rubygems.org/gems/rouge/versions/2.0.7
> >
> > I started with:
> >
> > guix import gem rouge > rouge.scm
> >
> > Then added some import headers in the file and tried to build it
> > with [..]
> > /gnu/store/6ks5gf4088qd23hac1cbd14aml6h1pgw-bundler-1.14.5/lib/ruby/gems/2.3.0/gems/bundler-1.14.5/lib/bundler/resolver.rb:386:in
> > `block in verify_gemfile_dependencies_are_found!': Could not find
> > gem 'wrong' in any of the gem sources listed in your Gemfile.
> > (Bundler::GemNotFound)
> > from /gnu/store/6ks5gf4088qd23hac1cbd14aml6h1pgw-bundler-1.14.5/lib/ruby/gems/2.3.0/gems/bundler-1.14.5/lib/bundler/resolver.rb:356:in
> > `each'
> > [..]
> >
> > Does that mean that I have to install
> > 'wrong' (https://rubygems.org/gems/wrong) that itself has 5
> > dependencies, 4 are not in Guix?  
> That seems to be the case, unfortunately. There also seems to be some 
> other gems in the Gemfile which aren't yet packaged for Guix. There
> are also a number of packages in the wip-rails branch on savannah
> which might be of use - these aren't quite ready yet but if there was
> interest I could finish them off.
> 
> If the number of packages needed gets too large, then there may be a 
> case for not running the tests in some packages.
> 
> Good luck.
> ben.


Rouge was just a leaf node in my dependency graph to Jekyll. Now it is
no longer a leaf, it is a node nearly on top... That dependency hell is
frustrating.

I would prefer not skipping the tests. For now I installed Jekyll from
my current distribution (Guix is currently just on top of that). I will
try to find some real leaf nodes later and start with them. But that
has low priority for me.

Thank you for your help,

Björn

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-17 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-14 22:08 Help with Ruby: rouge 2.0.7 Björn Höfling
2017-03-15 12:14 ` Ben Woodcroft
2017-03-17 22:48   ` Björn Höfling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).