Closed keeganstreet closed 11 years ago
I updated my Gemfile so it looks like this:
gem "wdm", "~>0.1.0"
gem "middleman", "~>3.1.3"
And now it works.
Maybe you need to add wdm to the Middleman Gemfile?
wdm
is part of the default Gemfile now, but commented out as it is only for Windows. Was this an older project?
Hey Thomas, this is on a brand new computer. I have just installed Ruby on it today. The project itself is old, yes, but its Gemfile specifies "middleman", "~>3.1.3" so I don't see how it would be trying to use old gem settings.
If you were to run middleman init
, the Gemfile that generates should now contain wdm
(commented out).
Thanks @tdreyno, it does. If we have a project where some developers use Mac and some use Windows, I guess this means we will have to leave the Gemfile and Gemfile.lock out of version control.
You could do this in your Gemfile:
if RUBY_PLATFORM =~ /win32/
gem "wdm"
end
Maybe our generated Gemfile should do that.
Oh thanks @bhollis, that sounds like a good solution for the Gemfile. Would it be possible to do anything with the Gemfile.lock? As I understand it is recommended that this file is also checked into version control for Ruby apps (reference: http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/).
I think this must be a problem other Ruby apps have solved before. Maybe I shouldn't be checking the Gemfile.lock file into version control for projects that are used on Windows and Mac.
Bundler has built-in support for this like so:
gem "wdm", :platforms => [:mswin, :mingw]
Thanks so much for this. I was having the same issue on my project (I'm also a Windows 7 user).
Upgraded middleman from 3.0.11 to 3.1.3 and got the same error as @keeganstreet. Messed around with this for ages before adding @tdreyno's solution above.
@tdreyno fixed our Gemfile template to automatically include wdm
on Windows platforms in 5806f2cbf53cb9b64a0904b6b91a977d8a8807b7.
:+1:
Thanks guys for posting... 'middleman init' really helped me to resolve issues.
Hi,
I get an error when running Middleman on Windows 7.
Ruby version: ruby 2.0.0p195 (2013-05-14) [x64-mingw32]
Middleman version: 3.1.3
Error:
List of installed bundles:
Can you please advise what is going wrong?