Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Jack

On Thursday, 21 October 2021 17:11:27 BST Peter Humphrey wrote:
> Hello list,
>
> I wanted to try this package to create a small site for myself, but  
I'm
> falling at the second hurdle (the first was setting package.env etc  
to pull

> in ruby26 as well as the currently installed ruby30).
>
> Does anyone have experience with this builder? I'd like to find out  
where

> I'm going wrong first.


I just noticed something which may or may not help.  The jekyllrb.com  
docs page, under Prerequisites, says Ruby version 2.5.0 or higher.  Why  
does the ebuild insist on 2.5 (no longer even in the tree) or 2.6.  If  
I were going to install it, the first thing I'd probably do is make a  
copy in my local overlay, and allow a newer version of ruby.  I don't  
think that is likely to help with your problem of not finding one thing  
or another, but who knows?  (A note lower down on that page says that  
using ruby 3.0.0 or higher add a requirement for webrick, but that is  
available in portage, and could be handled in the ebuild.




Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Peter Humphrey
On Thursday, 28 October 2021 14:42:44 BST Alec Ten Harmsel wrote:
> On Thu, Oct 28, 2021, at 09:25, Peter Humphrey wrote:
> > On Thursday, 28 October 2021 13:34:49 BST Alec Ten Harmsel wrote:
> >> I got jekyll installed via portage by adding:
> >> dev-ruby/* ~amd64
> >> www-apps/jekyll ~amd64
> >> www-apps/jekyll-* ~amd64
> >> 
> >> to package.accept_keywords, and then running `emerge www-apps/
jekyll'.
> >> This is on stable, with a tree that is a couple weeks old for what it's
> >> worth.
> > 
> > This system is ~amd64, so I didn't have to do that.
> > 
> >> Then `jekyll new testsite && bundle exec jekyll serve' works for me.
> > 
> > $ jekyll new myblog && bundle exec jekyll serve
> > ...
> > [A number of Bundler: Using... messages]
> > ...
> > New jekyll site installed in /home/prh/myblog.
> > Could not locate Gemfile or .bundle/ directory
> 
> I missed a step: 

$ jekyll new myblog && cd $_ && bundle exec jekyll serve
[...]
New jekyll site installed in /home/prh/myblog. 
Could not find jekyll-4.2.1, minima-2.5.1, jekyll-feed-0.15.1, terminal-
table-2.0.0, jekyll-seo-tag-2.7.1, unicode-display_width-1.8.0, rb-
fsevent-0.11.0 in any of the sources
Run `bundle install` to install missing gems.

Those missing gems can't really be missing, because I know they've been 
installed - they just can't be found, which is why I suspect my paths.

Inside ~/myblog, Gemfile can't be found. Outside, gems can't be found.

Another problem is that web-apps/jekyll is marked maintainer-needed, so 
there's no point in raising a bug.

-- 
Regards,
Peter.






Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Alec Ten Harmsel
On Thu, Oct 28, 2021, at 09:25, Peter Humphrey wrote:
> On Thursday, 28 October 2021 13:34:49 BST Alec Ten Harmsel wrote:
>
>> I got jekyll installed via portage by adding:
>> 
>> dev-ruby/* ~amd64
>> www-apps/jekyll ~amd64
>> www-apps/jekyll-* ~amd64
>> 
>> to package.accept_keywords, and then running `emerge www-apps/jekyll'.
>> This is on stable, with a tree that is a couple weeks old for what it's
>> worth.
>
> This system is ~amd64, so I didn't have to do that.
>
>> Then `jekyll new testsite && bundle exec jekyll serve' works for me.
>
> $ jekyll new myblog && bundle exec jekyll serve
> ...
> [A number of Bundler: Using... messages]
> ...
> New jekyll site installed in /home/prh/myblog. 
> Could not locate Gemfile or .bundle/ directory
>

Oops, I missed a step: `jekyll new myblog && cd $_ && bundle exec jekyll 
serve'. You'll have to change into the `myblog' directory.

Alec



Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Peter Humphrey
On Thursday, 28 October 2021 13:34:49 BST Alec Ten Harmsel wrote:

> I got jekyll installed via portage by adding:
> 
> dev-ruby/* ~amd64
> www-apps/jekyll ~amd64
> www-apps/jekyll-* ~amd64
> 
> to package.accept_keywords, and then running `emerge www-apps/jekyll'.
> This is on stable, with a tree that is a couple weeks old for what it's
> worth.

This system is ~amd64, so I didn't have to do that.

> Then `jekyll new testsite && bundle exec jekyll serve' works for me.

$ jekyll new myblog && bundle exec jekyll serve
...
[A number of Bundler: Using... messages]
...
New jekyll site installed in /home/prh/myblog. 
Could not locate Gemfile or .bundle/ directory

# find / -xdev -iname gemfile
/usr/lib64/ruby/gems/3.0.0/gems/jekyll-seo-tag-2.7.1/Gemfile
/usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.29/lib/bundler/templates/Gemfile
/usr/lib64/ruby/gems/2.6.0/gems/bundler-2.2.29/lib/bundler/templates/Gemfile
/usr/lib64/ruby/gems/2.6.0/gems/jekyll-4.2.0/lib/theme_template/Gemfile
$ find . -xdev -iname gemfile
./.local/share/gem/ruby/3.0.0/gems/jekyll-4.2.1/lib/theme_template/Gemfile
./.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/Gemfile
./.local/share/gem/ruby/3.0.0/gems/terminal-table-2.0.0/Gemfile
./.local/share/gem/ruby/3.0.0/gems/http_parser.rb-0.6.0/Gemfile
./.local/share/gem/ruby/3.0.0/gems/bundler-2.2.30/lib/bundler/templates/Gemfile
./.local/share/gem/ruby/3.0.0/gems/addressable-2.8.0/Gemfile
./.local/share/gem/ruby/3.0.0/gems/forwardable-extended-2.6.0/Gemfile
./.local/share/gem/ruby/3.0.0/gems/rb-inotify-0.10.1/Gemfile
./.local/share/gem/ruby/3.0.0/gems/em-websocket-0.5.2/Gemfile
./.local/share/gem/ruby/3.0.0/gems/sassc-2.4.0/Gemfile
./.local/share/gem/ruby/3.0.0/gems/concurrent-ruby-1.1.9/Gemfile
./.local/share/gem/ruby/3.0.0/gems/safe_yaml-1.0.5/Gemfile
./.local/share/gem/ruby/3.0.0/gems/rb-fsevent-0.11.0/Gemfile
./.local/share/gem/ruby/3.0.0/gems/bundler-2.2.29/lib/bundler/templates/Gemfile
./.local/share/gem/ruby/3.0.0/gems/ffi-1.15.4/Gemfile
./.local/share/gem/ruby/3.0.0/gems/colorator-1.1.0/Gemfile
./.local/share/gem/ruby/3.0.0/gems/rouge-3.26.1/Gemfile
./.local/share/gem/ruby/3.0.0/gems/public_suffix-4.0.6/Gemfile
./.local/share/gem/ruby/3.0.0/gems/pathutil-0.16.2/Gemfile
./myblog/Gemfile
$ grep -v \# myblog/Gemfile | grep -v ^$
source "https://rubygems.org;
gem "jekyll", "~> 4.2.0"
gem "minima", "~> 2.5"
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
end
platforms :mingw, :x64_mingw, :mswin, :jruby do
  gem "tzinfo", "~> 1.2"
  gem "tzinfo-data"
end
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

(That last line relates to Windows and Jruby.) It still looks like a PATH 
problem, but what do I know?   :(

> You could also try using jekyll outside of portage:
> 
> mkdir mysite && cd mysite
> bundle init
> bundle config set path 'vendor/bundle'
> bundle add jekyll
> bundle exec jekyll new --force .
> rm Gemfile.lock
> rm -rf ./vendor/bundle
> bundle config set path 'vendor/bundle'
> bundle install
> bundle exec jekyll serve
> 
> And then continue following other jekyll instructions as needed. You'll have
> to use `bundle exec jekyll ...' to run jekyll - you won't be able to run
> jekyll directly.

Thanks Alec. I may have to try something like that, but I'd rather have it 
installed by portage if I can.

Perhaps I'm just growing too old for this sort of thing...

-- 
Regards,
Peter.






Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Peter Humphrey
On Thursday, 28 October 2021 12:08:01 BST Dr Rainer Woitok wrote:

> I faintly remember  ... long time ago,  when I had to use some Ruby gems
> under both, Ubuntu and Gentoo I think I did something along the lines of
> 
>$ gem install $pkg --user-install

Er...
$ gem install jekyll bundler --user-install
ERROR:  Use --install-dir or --user-install but not both

I couldn't find anything helpful in '$ gem help install' either.

>$ ln -s $(ls -drv ~/.gem/ruby/*/gems/$pkg-*/bin/$pkg | head -1) ~/bin
> 
> where the asterisks matched different Ruby and package versions, respec-
> tively, and the "-rv" option for the "ls" command caused the most recent
> versions to be picked by the "head" command.  And of course, my personal
> "~/bin/" directory was mentioned in "PATH" early on.
> 
> Not sure though, whether or not that will help you.

Thanks anyway, Rainer.

-- 
Regards,
Peter.






Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Alec Ten Harmsel
Hi Peter,

On Wed, Oct 27, 2021, at 09:31, Peter Humphrey wrote:
> On Thursday, 21 October 2021 17:11:27 BST Peter Humphrey wrote:
>> Hello list,
>> 
>> I wanted to try this package to create a small site for myself, but I'm
>> falling at the second hurdle (the first was setting package.env etc to pull
>> in ruby26 as well as the currently installed ruby30).
>> 
>> Does anyone have experience with this builder? I'd like to find out where
>> I'm going wrong first.
>
> I'm still not getting through the installation of jekyll. The website[1] says 
> to follow the instructions for Ubuntu, but something's lacking. For one 
> thing, 
> it says to include ~/gems/bin in my PATH, but there isn't one. I looked for 
> something similar under / but nothing turned up.
>
> I followed the instructions to install jekyll and its dependencies, then:
> $ gem install jekyll bundler
> which went fine, but this failed with a bunch of not-found errors, including 
> jekyll itself:
> $ jekyll new myblog
>
> Am I still missing a component, or something?

I got jekyll installed via portage by adding:

dev-ruby/* ~amd64
www-apps/jekyll ~amd64
www-apps/jekyll-* ~amd64

to package.accept_keywords, and then running `emerge www-apps/jekyll'. This is 
on stable, with a tree that is a couple weeks old for what it's worth. Then 
`jekyll new testsite && bundle exec jekyll serve' works for me.

You could also try using jekyll outside of portage:

mkdir mysite && cd mysite
bundle init
bundle config set path 'vendor/bundle'
bundle add jekyll
bundle exec jekyll new --force .
rm Gemfile.lock
rm -rf ./vendor/bundle
bundle config set path 'vendor/bundle'
bundle install
bundle exec jekyll serve

And then continue following other jekyll instructions as needed. You'll have to 
use `bundle exec jekyll ...' to run jekyll - you won't be able to run jekyll 
directly.

Hope this helps,

Alec



Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Dr Rainer Woitok
Peter,

On Thursday, 2021-10-28 09:53:48 +0100, you wrote:

> On Wednesday, 27 October 2021 14:59:13 BST Peter Humphrey wrote:
> 
> > One possibility occurred to me: is having two ruby versions installed at
> > once the problem? I already had 3.0 installed, the current Gentoo version,
> > but jekyll needs 2.6. To test this idea, I'd have to downgrade the whole
> > system to 2.6; I don't know whether that's even feasible now.
> 
> The more I think about it, the more I suspect my path setting. In Ubuntu, 
> apparently, there's a ~/gems/bin directory, which is to go at the head of the 
> PATH, but what's the equivalent in Gentoo? I could create that directory, but 
> what should I put in it?

I faintly remember  ... long time ago,  when I had to use some Ruby gems
under both, Ubuntu and Gentoo I think I did something along the lines of

   $ gem install $pkg --user-install
   $ ln -s $(ls -drv ~/.gem/ruby/*/gems/$pkg-*/bin/$pkg | head -1) ~/bin

where the asterisks matched different Ruby and package versions, respec-
tively, and the "-rv" option for the "ls" command caused the most recent
versions to be picked by the "head" command.  And of course, my personal
"~/bin/" directory was mentioned in "PATH" early on.

Not sure though, whether or not that will help you.

Sincerely,
  Rainer



Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Peter Humphrey
On Wednesday, 27 October 2021 14:59:13 BST Peter Humphrey wrote:

> One possibility occurred to me: is having two ruby versions installed at
> once the problem? I already had 3.0 installed, the current Gentoo version,
> but jekyll needs 2.6. To test this idea, I'd have to downgrade the whole
> system to 2.6; I don't know whether that's even feasible now.

The more I think about it, the more I suspect my path setting. In Ubuntu, 
apparently, there's a ~/gems/bin directory, which is to go at the head of the 
PATH, but what's the equivalent in Gentoo? I could create that directory, but 
what should I put in it?

In fact, I did create the directory, empty, and these commands did finish:

$ GEM_HOME="$HOME/gems" PATH="$HOME/gems/bin:$PATH" gem install 
jekyll bundler
$ jekyll new myblog --force

But then, 
$ GEM_HOME="$HOME/gems" PATH="$HOME/gems/bin:$PATH" bundle exec 
jekyll serve
Could not locate Gemfile or .bundle/ directory

I'm clutching at straws, as you can see...

-- 
Regards,
Peter.






Re: [gentoo-user] Anyone using www-apps/jekyll?

2021-10-28 Thread Peter Humphrey
On Wednesday, 27 October 2021 17:25:55 BST Jack wrote:
> On 2021.10.27 09:59, Peter Humphrey wrote:
> > One possibility occurred to me: is having two ruby versions installed
> > at once the problem? I already had 3.0 installed, the current Gentoo
> > version, but jekyll needs 2.6. To test this idea, I'd have to downgrade
> > the whole system to 2.6; I don't know whether that's even feasible now.
> 
> Ruby is slotted, so you can have 2.6 and 3.0 installed together.

As I thought, so it isn't that then.

> You would then need to rebuild rubygems to target both of them.

Yes, portage made sure of it while installing jekyll.

> There is also a virtual/rubygems.  I'm not really sure of it's function, but
> it seems to just specify a minimum version of rubygems per targetted
> version of ruby.

...and to ensure that the proper version is installed for each ruby target 
specified?

-- 
Regards,
Peter.