-
Notifications
You must be signed in to change notification settings - Fork 55
'bundle exec jekyll server -w -s _source -d _site' does not work for ruby 2.2.0 #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's a known (at least debated) issue with ruby. I'd be happy to add a "recommended version" statement to README.md if that would help. Could it be specific to Mac (my platform)? I don't know. |
This seems like a jekyll dependency. We really need to move this over to the normal GitHub Pages flow. We went the current route because @pkriens needed jekyll 2 features and, at the time, GitHub Pages only used jekyll 1. |
Let me know if I can help? |
Well if you have any skills with GitHub Pages, please take a crack at converting this away from the current model where we build on travis and push to built pages back to the vanilla GitHub Pages model. I tried once on https://github.com/bndtools/bnd.manual which uses the same build but my fu was not enough. |
See https://github.com/osgi/osgi.enroute.site/blob/master/.travis.yml#L3 which declares 2.0 as the required ruby to build the site. |
I didn't know to look at the travis.yml file. Sorry. I am fu-less on GitHub pages. I'll see what I can do. |
I'll report back on my progress tomorrow unless you need to hear sooner. |
No rush. @pkriens and I will be at OSGi meetings next week anyway. So we probably will have little spare time... |
I have spent hours on this one hoping to knock it out. I used the Gemfile from jekyll that is designed to install exactly what Github specifies. Fresh jekyll project ( |
resetting the branch didn't help - same result |
I'm looking for a snipe |
I've opened an issue with the pages guys: github/pages-gem#114. I'm packing it in for the night. |
OK. The pages guys found the issue. I now get consistent results from a fresh Jekyll install. I am testing basic edits. What seems to make sense to me is to incrementally add the osgi.enroute.site content to this working repo, testing all the way up. I'm not sure what to do once I get it all working. I guess we'll see when I get there. Please stop me if I should head another way. |
Ehhh. Since Github pages did not support Jekyll 2.+ at the time I could not use Github page as is. I just installed Jekyll 2.from their site and that worked fine. Remember that all those bundles and gem files were a pain in the ass as well. Then in the master branch you make changes. If you commit, we build on travis and push gh-pages which are then without any further Jekyll help displayed as html. To verify locally you use (cwd = root of master branch) jekyll server -w -s _source -d _site Post 4000 then on localhost shows you the local mapping. |
Yup. I understand that process. BJ was talking about getting out of the Travis build business. I have a repo that GitHub builds consistently and was going to migrate/reconfigure the current content so Travis is out of the loop. Would you like me to work in that direction or leave as is? I have an issue open (GrantPax/osgi.enroute.site.gh-pages#1 GrantPax/osgi.enroute.site.gh-pages#1) and was going to document work there. I’ll stop if you’d rather I work somewhere else.
|
I want to pursue using normal github pages. I'll talk with @pkriens this week to make sure he is in agreement. |
Thanks for the feedback. I will proceed until I hear otherwise.
|
OK. After some heads down, I have a Travis-less, all-GitHub repo working here. Most of the trouble came from pathing issues with a smattering of other stuff. There's more to do (like the ends of the next<-->previous navigation are still broken). I made some notes on the work here: GrantPax/osgi.enroute.site.gh-pages#1. I have created a few other issues that need to be addressed both sooner and later. I will continue that logging process as appropriate. If you like what you see (so far), we have to decide what's next. I'm not git-smart enough to know how to apply all the changes I made to my from-scratch repo in any automated way. I don't know how important the history is to you. If you really, really need the history, I'll figure out how to fix the existing repo using what I've learned from this process. My only concern there is the threat of enroute.osgi.org being down for one reason or another. I'll keep cleaning up and continue working through the tutorials and examples, modifying my new repo - unless you tell me to do differently. |
I’d rather keep it working as it is. I am using some advanced features of Jekyll and noticed that Github was rather slow in picking it up. Anyway, it works and there is more than enough work on things that don’t work :-) Kind regards,
|
Either way is fine with me. As I said, I have the site working without Travis with the exception of a minor bug or two. I'll probably have those squashed today. I haven't noticed any build lag from GitHub — and maybe I'm missing something. Again, either way. I'd hate to be the point of some contention. I'm just looking to be helpful. Please accept my apologies if I somehow messed something up. |
Ok. With no disrespect for Peter's desire to use the current configuration or other innuendo, the migration to a GitHub-only build is complete. I only finished it off because I was almost there by the time Peter voiced a preference to the contrary. The reconfigured repo can be used or not. It's entirely up to you. I'm off to work on the tutorial. |
Oops. Forgot. If someone does decide to use the GitHub-only version, the necessary configuration is outlined in the CONFIGURATION.md file in the meta-config branch. |
Thanks. I talked with Peter and he is ok with proceeding with this but I won't be able to look at your work until next week when I get back from my trip. |
That works. I hope it helps. Until you have a chance to review, I will duplicate my edits to keep the content of both repos in sync in case something doesn’t work out. I hope your trip is fruitful. Please give Peter my regards.
|
Given that all meaningful work has to end up in the |
I looked at your repo but the changes were too many and I did not see many of them as necessary. For example, you added base_url everywhere which is not needed on the actual website but only due to the way you were testing. But after looking at your changes, I realized I could easily do the change and preserve the history. So I made commit 32b17a3 which converted the site over to github pages. It took a few more commits to get the travis as a test builder for PRs working right but all seems good now. The main think I learned from your work was the Gemfile. Thanks for finding that. It was the key to making the change easy. The rest was just moving files from _source => / and some other doc and script edits. |
Per the 4th comment on my initial issue, I simply could not get the GitHub render to work without the base_url. You clearly have fu I don't. The base_url did indeed make for too many changes. For what it's worth, here is the GitHub pages issue where the gh-pages gem guys told me to set the base_url. So much for that. My fu-lessness hasn't changed. I'm glad the Gemfile helped at least. |
Oh. This is the testing issue to which you were referring: jekyll/jekyll#332. I see. I wish I had understood that. |
You had it set up as a project site rather than a user site which is why you needed the baseurl. |
Education is expensive. Thanks.
|
Running ruby 2.2.2p95 on my machine, I was not able to start the application locally: `jekyll --server` would return this error: ``` ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:385:in `block in require_program': program version required (Commander::Runner::CommandError) from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:384:in `each' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:384:in `require_program' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:52:in `run!' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/delegates.rb:8:in `run!' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>' ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in `<module:SafeYAML>': undefined method `tagged_classes' for Psych:Module (NoMethodError) from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in `<top (required)>' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `require' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `<top (required)>' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jekyll-1.5.1/lib/jekyll.rb:21:in `require' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jekyll-1.5.1/lib/jekyll.rb:21:in `<top (required)>' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jekyll-1.5.1/bin/jekyll:7:in `require' from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jekyll-1.5.1/bin/jekyll:7:in `<top (required)>' from ~/.rbenv/versions/2.2.2/bin/jekyll:23:in `load' from .rbenv/versions/2.2.2/bin/jekyll:23:in `<main>' ``` I found this to be a known issue (see [this](dtao/safe_yaml#67), [this](http://stackoverflow.com/questions/29245100/github-pages-error-running-jekyll-locally) and [this](eclipse-osgi-technology/osgi.enroute.site#8)), and was able to start the application by running `bundle update jekyll`.
I tried 2.2.0 and it failed. 2.1.4 works.
$ rvm use 2.2.0
'Using /usr/local/rvm/gems/ruby-2.2.0
$ bundle exec jekyll server -w -s _source -d _site
/usr/local/rvm/gems/ruby-2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in
<module:SafeYAML>': undefined method
tagged_classes' for Psych:Module (NoMethodError)from /usr/local/rvm/gems/ruby-2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in
<top (required)>' from /usr/local/rvm/gems/ruby-2.2.0/gems/jekyll-2.0.3/lib/jekyll.rb:21:in
require'from /usr/local/rvm/gems/ruby-2.2.0/gems/jekyll-2.0.3/lib/jekyll.rb:21:in
<top (required)>' from /usr/local/rvm/gems/ruby-2.2.0/gems/jekyll-2.0.3/bin/jekyll:6:in
require'from /usr/local/rvm/gems/ruby-2.2.0/gems/jekyll-2.0.3/bin/jekyll:6:in
<top (required)>' from /usr/local/rvm/gems/ruby-2.2.0/bin/jekyll:23:in
load'from /usr/local/rvm/gems/ruby-2.2.0/bin/jekyll:23:in
<main>' from /usr/local/rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in
eval'from /usr/local/rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `
$ rvm use 2.1.4
Using /usr/local/rvm/gems/ruby-2.1.4
$ bundle exec jekyll server -w -s _source -d _site
Configuration file: _source/_config.yml
Source: _source
Destination: _site
Generating...
done.
Auto-regeneration: enabled
Configuration file: _source/_config.yml
Server address: http://0.0.0.0:4000/
Server running... press ctrl-c to stop.
The text was updated successfully, but these errors were encountered: