Closed ben0x539 closed 3 years ago
@ben0x539 First of all: Thanks for your report :)
I never noticed this because I was only using jekyll serve
(that should work, at least if the site doesn't have any special dependencies).
The problem is that jekyll new
seems to use bundler
to install the dependencies and assumes that bundler
is already installed on the system (e.g. via gem install bundler jekyll
from the quick-start instructions on the website). But bundler
itself isn't a dependency of jekyll
, at least it's not in the Gemfile (I'm actually not that familiar with Ruby).
If I run jekyll new my-awesome-site
I'm getting the following error message:
Running bundle install in /tmp/my-awesome-site...
jekyll 3.8.3 | Error: No such file or directory - ruby
I'm actually not sure what to do here because running bundler install
doesn't make much sense (IMO) with Nix(OS).
You could use jekyll new --skip-bundle my-awesome-site
but if I then run jekyll serve
it will result in the following error:
Configuration file: /tmp/my-awesome-site/_config.yml
jekyll 3.8.3 | Error: The minima theme could not be found.
It would probably make sense to add the default theme as a dependency, but adding all common themes would most likely just result in a lot of unnecessary bloat.
It might make sense to add additional "use flags" like withBundler
and withDefaultTheme
but the implementation of that might be a bit problematic.
Anyway, I'm open for suggestions if you have any ideas :)
(If not we can just leave this issue open and I'll try to come up with something when I have more time.)
Yeah, I don't really know my way around either ruby packaging or how to model it in nixpkgs. This is mostly a drive-by bug report as I'm unlikely to be able to invest much time in jekyll for the time being.
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
This seems to work now:
$ nix-shell -p jekyll
(...)
$ jekyll new my-awesome-site
Running bundle install in /tmp/asdf/my-awesome-site...
Bundler: Skipping "bundle install" as it fails due to the Nix wrapper.
Bundler: Please enter the new directory and run the following commands to serve the page:
Bundler: nix-shell -p bundler --run "bundle install --gemfile=Gemfile --path vendor/cache"
Bundler: nix-shell -p bundler --run "bundle exec jekyll serve"
New jekyll site installed in /tmp/asdf/my-awesome-site.
So I think this is fixed. Closing, feel free to comment if it still happens for you though.
Issue description
After
nix-env -iA nixos.jekyll
, thejekyll new my-awesome-site
command from the "Get up and running in seconds" blurb on the jekyll site doesn't work.Steps to reproduce
Technical details
"x86_64-linux"
Linux 4.14.42, NixOS, 18.09pre140958.696c6bed4e8 (Jellyfish)
yes
yes
nix-env (Nix) 2.0.2
""
"nixos-18.09pre142796.4b649a99d84"
/nix/var/nix/profiles/per-user/root/channels/nixos