Skip to content
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

When I upgraded the Mac system, I can't Preview #1749

Closed
liuchungui opened this issue Oct 11, 2015 · 9 comments
Closed

When I upgraded the Mac system, I can't Preview #1749

liuchungui opened this issue Oct 11, 2015 · 9 comments

Comments

@liuchungui
Copy link

@liuchungui liuchungui commented Oct 11, 2015

Work well in Mac10.10, but when I upgraded to Mac10.11, I input command 'rake preview', got following error.

$rake preview
Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
rake aborted!
Errno::ENOENT: No such file or directory - compass
/Users/user/git/octopress/Rakefile:85:in spawn
/Users/user/git/octopress/Rakefile:85:in block in <top (required)>
Tasks: TOP => preview
(See full trace by running task with --trace)
userdeMacBook-Pro:octopress user$ Configuration file: /Users/user/git/octopress/_config.yml
Source: source
Destination: public
Generating...
done.
Auto-regeneration: enabled for 'source'

@schalkneethling
Copy link

@schalkneethling schalkneethling commented Oct 15, 2015

I am getting exactly the same error on El Capitan. rake generate works fine (seemingly) but rake watch fails with the same error.

@schalkneethling
Copy link

@schalkneethling schalkneethling commented Oct 15, 2015

Here is my trace:

$ rake preview --trace
** Invoke preview (first_time)
** Execute preview
Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
rake aborted!
Errno::ENOENT: No such file or directory - jekyll
/Users/espressive/repos/schalk-neethling/Rakefile:84:in `spawn'
/Users/espressive/repos/schalk-neethling/Rakefile:84:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/usr/bin/rake:37:in `<main>'
Tasks: TOP => preview
@schalkneethling
Copy link

@schalkneethling schalkneethling commented Oct 15, 2015

Alrighty @liuchungui so here is the tl;dr of what I did to get this to work on El Capitan:

Install rbenv [https://github.com/sstephenson/rbenv]
Install ruby 2.2.2 rbenv install 2.2.2
Now, inside the root of your octopress blog do

rbenv local 2.2.2
gem install bundler
rbenv rehash
bundle install

rake preview etc. should now all work. I assume it has something to do with the Ruby version that comes with El Capitan although not 100% certain. HTH!

@liuchungui
Copy link
Author

@liuchungui liuchungui commented Oct 22, 2015

Thank you, it work for me.

@liuchungui
Copy link
Author

@liuchungui liuchungui commented Oct 22, 2015

I edit Gemfile, and change source.

source 'https://ruby.taobao.org/'

group :development do
  gem 'rake', '~> 10.0'
  gem 'jekyll', '~> 2.0'
  gem 'octopress-hooks', '~> 2.2'
  gem 'octopress-date-format', '~> 2.0'
  gem 'jekyll-sitemap'
  gem 'rdiscount', '~> 2.0'
  gem 'RedCloth', '~> 4.2.9'
  gem 'haml', '~> 4.0'
  gem 'compass', '~> 1.0.1'
  gem 'sass-globbing', '~> 1.0.0'
  gem 'rb-fsevent', '~> 0.9'
  gem 'stringex', '~> 1.4.0'
end

gem 'sinatra', '~> 1.4.2'
@liuchungui liuchungui closed this Oct 22, 2015
@JonyFang
Copy link

@JonyFang JonyFang commented Nov 8, 2015

This is what I did to get this to work on El Capitan:

1.Clear git cache
rm -rf /usr/local/.git

2.Uninstall Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

3.Install RVM
curl -L https://get.rvm.io | bash -s stable --ruby

4.Install Ruby 2.2.3:

rvm install ruby-2.2.3

rvm use 2.2.3

rvm rubygems latest

Run ruby --version to be sure you're using Ruby 2.2.3.

4.Next, install dependencies.

cd octopress

sudo gem install bundler

bundle install

rake preview etc. now all work. It's work for me in EI Capitan.

@aertoria
Copy link

@aertoria aertoria commented Nov 9, 2015

Great post. Every time osx upgrade there always will be something

@caiyue1993
Copy link

@caiyue1993 caiyue1993 commented Dec 21, 2015

Thank you @JonyFang . I've tried lots of methods to fix it,finally it works on my EI Capitan. However,ruby 2.2.2 is also OK.

@dfalster
Copy link

@dfalster dfalster commented Jun 6, 2017

Thanks for this @schalkneethling, solved my issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.