micro-os-plus / web-jekyll

The complete Jekyll source for the µOS++ IIIe web site
http://micro-os-plus.github.io
2 stars 7 forks source link

Create Gemfile for use with bundler #2

Closed carlosdelfino closed 8 years ago

carlosdelfino commented 8 years ago

on the deposit of the Gemfile.lock I followed the site's guidelines:

http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/

ilg-ul commented 8 years ago

If possible, please create separate requests for separate issues.

I added jekyll-multiple-languages, languages: and language_default: to _config.yml and the site build fails with:

no implicit conversion of nil into String
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-multiple-languages-2.0.3/lib/jekyll-multiple-languages/page.rb:21:in `+'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-multiple-languages-2.0.3/lib/jekyll-multiple-languages/page.rb:21:in `process'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-redirect-from-0.10.0/lib/jekyll-redirect-from/redirect_page.rb:17:in `initialize'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-redirect-from-0.10.0/lib/jekyll-redirect-from/redirector.rb:16:in `new'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-redirect-from-0.10.0/lib/jekyll-redirect-from/redirector.rb:16:in `block (2 levels) in generate_alt_urls'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-redirect-from-0.10.0/lib/jekyll-redirect-from/redirector.rb:15:in `each'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-redirect-from-0.10.0/lib/jekyll-redirect-from/redirector.rb:15:in `block in generate_alt_urls'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-redirect-from-0.10.0/lib/jekyll-redirect-from/redirector.rb:13:in `each'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-redirect-from-0.10.0/lib/jekyll-redirect-from/redirector.rb:13:in `generate_alt_urls'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-redirect-from-0.10.0/lib/jekyll-redirect-from/redirector.rb:8:in `generate'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/lib/jekyll/site.rb:154:in `block in generate'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/lib/jekyll/site.rb:153:in `each'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/lib/jekyll/site.rb:153:in `generate'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-multiple-languages-2.0.3/lib/jekyll-multiple-languages/site.rb:25:in `generate'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/lib/jekyll/site.rb:58:in `process'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-multiple-languages-2.0.3/lib/jekyll-multiple-languages/site.rb:11:in `process'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/lib/jekyll/command.rb:26:in `process_site'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/lib/jekyll/commands/build.rb:60:in `build'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/lib/jekyll/commands/build.rb:33:in `process'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/lib/jekyll/commands/serve.rb:34:in `block (2 levels) in init_with_program'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
/opt/homebrew-jekyll3/lib/ruby/gems/2.3.0/gems/jekyll-3.1.6/bin/jekyll:13:in `<top (required)>'
/opt/homebrew-jekyll3/bin/jekyll:23:in `load'
/opt/homebrew-jekyll3/bin/jekyll:23:in `<main>'                    done in 11.821 seconds.

as for the Gemfile, my experience with Ruby is very limited, so I cannot estimate the consequences of adding this file. can you elaborate?

carlosdelfino commented 8 years ago

These first two deposits were a little confused, I made a mistake and had to amend it.

The Pull Request #2 only relative the installation of the plugin. The Pull Request #3 is relative the creation of templates for issues.

It really seems that this plugin is in trouble is not working right, I'll do some tests on another site I have to follow a more conventional standard of Jekyll to see if the layout of directories or something relative the version.

ilg-ul commented 8 years ago

The Pull Request #2 only relative the installation of the plugin.

I'm not able to follow you, I installed the plugin with

sudo gem install jekyll-multiple-languages

The Pull Request #3 is relative the creation of templates for issues.

I already did this manually, except the pull request template.

carlosdelfino commented 8 years ago

Well, do not command the ruby, I'm far from being a programmer in this language.

But as far as I went, the bundler creates a safe environment for both development and production, controlling the dependencies required for a successful implementation of the application.

In the case of Jykill can determine that used the exact gems that another programmer is using, so we can even specify the versions we want to use, avoiding unexpected results in each environment, since it will allow the application only usse specified in Gemfile

so that it goes well, you must first run the command:

bundler install

the update can also be good

bundler update

and then run the Jekyll for example:

bundler exec jekyll

Any other words, I'd be copying from the site: http://bundler.io/rationale.html

carlosdelfino commented 8 years ago

Awaiting the return of the @liaohuqiu, he already set as a bug. liaohuqiu/jekyll-multiple-languages#14

It would be nice a :+1: on post to encourage it. :D

ilg-ul commented 8 years ago

the bundler creates a safe environment

aha! I like safe environments, so I added the Gemfile and updated the README (please check if it is ok).

however I removed the Gemfile.lock from the repository, as suggested by Yehuda Katz, in the first link you provided.

I guess that this issue can be closed.

carlosdelfino commented 8 years ago

We could open another to discuss the "directory structure considering the translation."

Because with the duplication of files each following your language, not observing a pattern you can become very confusing.

we need to define such a standard not only for us but for others who might come looking to translate to their native languages.

carlosdelfino commented 8 years ago

I consider the important presence of Gemfile.lock to maintain the accuracy of the versions of the gems used to generate the site with Jekyll, preventing the site has little different details on each machine participant in translation. For now only two of us, but in the future may arise others.

In the Yehuda Katz article, he says that when developing an application, in our case we consider to be a site-based applications, we need all plugins and dependencies behave the same way, avoiding surprises, so I think we should tie its dependencies also.

When developing an app, check in your Gemfile.lock, since you will use the bundler tool across all machines, and the precision enforced by bundler is extremely desirable for applications.

ilg-ul commented 8 years ago

what you basically say is that I should commit the Gemfile.lock and you (and possibly others) will be forced to use exactly the same gem versions? but how does this work? is bundler install installing them?

ilg-ul commented 8 years ago

I brought back Gemfile.lock. please confirm that it is ok and possibly close this ticket.

ilg-ul commented 8 years ago

open another to discuss the "directory structure considering the translation."

yes, we definitely need to define the folder structure for a multi-language site; please open a new ticket and make a suggestion.

carlosdelfino commented 8 years ago

whenever it negotiated a change of version or added new gem / plugin.

bundle install

For update use

bundle update

And to run the 'Jekyll' use

bundle exec jekyll-path-more-executable jekyll-options


and go ahead :D

ilg-ul commented 8 years ago

I guess I got it. can you check if the README file is now correct?

carlosdelfino commented 8 years ago

I see, is ok. thanks.

ilg-ul commented 8 years ago

great, thank you.