chesterhow/tale

Bundler error using fork method

Closed this issue · 6 comments

I tried to set up this repository as a new jekyll site using the fork method. When I run jekyll build or jekyll server I get this error from Bundler:

/Users/myname/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/dsl.rb:87:in `gemspec':  (Bundler::Dsl::DSLError)
[!] ≈ at /Users/myname/work/myproject2/myproject-jekyll/tale. Bundler cannot continue.

 #  from /Users/myname/work/myproject2/myproject-jekyll/tale/Gemfile:4
 #  -------------------------------------------
 #  source "https://rubygems.org"
 >  gemspec
 #  -------------------------------------------
        from /Users/myname/work/myproject2/myproject-jekyll/tale/Gemfile:4:in `eval_gemfile'
        from /Users/myname/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/dsl.rb:47:in `instance_eval'
        from /Users/myname/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/dsl.rb:47:in `eval_gemfile'
        from /Users/myname/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/dsl.rb:12:in `evaluate'
        from /Users/myname/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/definition.rb:35:in `build'
        from /Users/myname/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler.rb:135:in `definition'
        from /Users/myname/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler.rb:101:in `setup'
        from /Users/myname/.rvm/gems/ruby-2.4.1/gems/jekyll-3.7.2/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
        from /Users/myname/.rvm/gems/ruby-2.4.1/gems/jekyll-3.7.2/exe/jekyll:11:in `<top (required)>'
        from /Users/myname/.rvm/gems/ruby-2.4.1/bin/jekyll:23:in `load'
        from /Users/myname/.rvm/gems/ruby-2.4.1/bin/jekyll:23:in `<main>'
        from /Users/myname/.rvm/gems/ruby-2.4.1@global/bin/ruby_executable_hooks:15:in `eval'
        from /Users/myname/.rvm/gems/ruby-2.4.1@global/bin/ruby_executable_hooks:15:in `<main>'

My environment:

Mac OSX 10.13.2
Ruby: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin17]
Jekyll: jekyll 3.7.2
Bundler: Bundler version 1.16.1
rvm: rvm 1.29.3 (latest)

I guess a workaround for that error is just comment out the line gemspec in the Gemfile so all I have now is:

# frozen_string_literal: true

source "https://rubygems.org"
#gemspec

Bundler is happier about it:

$bundle install
The Gemfile specifies no dependencies
Resolving dependencies...
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

However jekyll still won't build:

$ jekyll serve
Configuration file: /Users/myname/work/myproject2/myproject-jekyll/tale/_config.yml
  Dependency Error: Yikes! It looks like you don't have jekyll-paginate or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-paginate' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!

I am new to ruby + jekyll, so not sure what should be correct in the Gemfile.

Hi mate,

I know very little about Ruby as well. However see below on how to get the theme working.

  1. update files below. see below.

  2. Then install bundler, the gems, then serve.

    1. gem install bundler (90% sure that's it)
    2. bundle install
    3. bundle exec jekyll serve

Gemfile

source "https://rubygems.org"

gem "jekyll"

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-paginate"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

_config.yml (Line 22) (rename plugins to plugins_dir)

# Gems
plugins_dir:
  - jekyll-paginate

Hopefully that helps. Worked for me on Windows 10.

Kind regards,

Ah I think I know what the problem is here. I'm assuming you followed the instructions and deleted the gemspec file? Could you try restoring that file and testing it again? It should work this time. Let me know how it goes, so I can update the readme with the right instructions 😄

Hi @ammianus any updates?

Closing due to inactivity

I tried this, and did not delete the gemspec file. This worked as you suggested! Maybe you can update the readme.