jeudi 20 octobre 2016

Can't run middleman server. What's wrong?

I'm using Windows, I have Ruby21 (C:\Ruby21) and RubyDevKit (C:\RubyDevKit) installed.

I want to build a site with Middleman, and I found these articles by Ben Frain, Brett Klamer, and Tuts+.

When I type gem install middleman from C:/, it works. I can see middleman-cli-4.1.10 folder and middleman-core-4.1.10 folder in: C:\Ruby21\lib\ruby\gems\2.1.0\gems

And then I run middleman init my_site, it works too. Now, I have (in my_site folder): source, .gitignore, config.rb, config.ru, Gemfile, and Gemfile.lock.

But, everytime I run middleman server nor bundle exec middleman server, it gives me this:

WARN: Unresolved specs during Gem::Specification.reset:sass (>= 3.4)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
C:/Ruby21/lib/ruby/gems/2.1.0/gems/middleman-cli-4.1.10/bin/middleman:12:in`require':
cannot load such file -- dotenv (LoadError)from C:/Ruby21/lib/ruby/gems/2.1.0/gems/middleman-cli-4.1.10/bin/middleman:12:in `<top (required)>'
from C:/Ruby21/bin/middleman:22:in `load'
from C:/Ruby21/bin/middleman:22:in `<main>'

My question is, why does this happen? And how to solve this?

I think that I'm in the wrong folder when I run middleman init my_site. If so, then where should I run it? Am I need to run it in a special folder, or I can run it everywhere?

Thank you.

Aucun commentaire:

Enregistrer un commentaire