codeisland / codeisland.github.io

New home for Code Island projects
2 stars 4 forks source link

Get @frymaster set up with a local dev environment #16

Closed goldenmeanie closed 9 years ago

goldenmeanie commented 9 years ago

John needs to be able to run Jekyll locally.

goldenmeanie commented 9 years ago

@Frymasterspeck start here: http://jekyllrb.com/docs/quickstart/

If you run into problems, let me know and we can do a screenshare (or meet in person) to get you set up.

Frymasterspeck commented 9 years ago

terminal-indeed

As they say in Vermont, "If you have to ask directions, you probably shouldn't be goin".

Do I have to be that pseudo-Sioux user?

Frymasterspeck commented 9 years ago

btw, @dannychapman, why do i hate apple? to get that image, I had to choose to open terminal in the "pro" view, which is almost at the bottom of the list. default terminal in mavericks is a white screen.

goldenmeanie commented 9 years ago

Yep sudo gem install jekyll

Frymasterspeck commented 9 years ago

Danger, Will Robinson! no-typee

It asks for a password, but disables the keyboard. Except for the Return key. Open to suggestions...

goldenmeanie commented 9 years ago

It is listening for your password. Not showing the characters is a security feature : )

You can copy and paste if blind typing is too disorienting!

Frymasterspeck commented 9 years ago

You know, I thought that might be the case and tried typing and pasting, with no result. But I suddenly realized that I was using my Apple pw, not my local machine pw. (D'oh!)

So this is the result I got. Are these extensions critical?

Fetching: liquid-2.6.1.gem (100%) Successfully installed liquid-2.6.1 Fetching: kramdown-1.5.0.gem (100%) Successfully installed kramdown-1.5.0 Fetching: mercenary-0.3.5.gem (100%) Successfully installed mercenary-0.3.5 Fetching: safe_yaml-1.0.4.gem (100%) Successfully installed safe_yaml-1.0.4 Fetching: colorator-0.1.gem (100%) Successfully installed colorator-0.1 Fetching: yajl-ruby-1.1.0.gem (100%) Building native extensions. This could take a while... ERROR: Error installing jekyll: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/yajl-ruby-1.1.0 for inspection. Results logged to /Library/Ruby/Gems/2.0.0/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out

joealba commented 9 years ago

You need XCode installed -- along with the command line tools add-on. Check out the steps in the solution here, as it's the same as what you'll need to do: http://stackoverflow.com/questions/19580685/installing-rails-on-mavericks

If that doesn't solve it for you, I can help you get a more better Ruby installed using RVM (http://rvm.io)

Frymasterspeck commented 9 years ago

Okay, it looks like Jekyll is in there. On this page in the Jekyll tutorial, where it says "...the current folder...", how do I specify/select the source and destination? Do I enter the folder path in the Terminal shell from /Users/user/Desktop/etc?

Also, Jekyll seems to be looking for a config file. Where would that be/need to be created?

johnnys-big-mac:~ user$ jekyll build Configuration file: none Source: /Users/user Destination: /Users/user/_site Generating... jekyll 2.5.2 | Error: user 1412b-js-resume~sakepf.idlk doesn't exist

goldenmeanie commented 9 years ago

The config file is in the root directory of the repo. That's where you want to be, not _site.

goldenmeanie commented 9 years ago

You'll also want to use jekyll serve --watch so that it will spin up a server and update the served copy whenever you save a change to disk.

Frymasterspeck commented 9 years ago

"Explain, as you would a child."

https://www.youtube.com/watch?v=VWpcMp-h2DE

goldenmeanie commented 9 years ago

I have cloned the repo to ~/Sites/codeisland.github.io

So:

cd ~/Sites/codeisland.github.io
jekyll serve --watch

I have made an alias that moves me to that directory, opens the site in a text editor, and starts the server. I can show you how to do that next meeting.

Frymasterspeck commented 9 years ago

"...as you would a child." I am currently viewing rendered, navigable pages from localhost:4001, just as Sarris has ordered.

Thanks, Alex and Joe.

nsngu

goldenmeanie commented 9 years ago

(thumbsup)