Mindmup Github是在线制作思维导图的,来查阅如何安装mindmup的同学应该已经知道这是个什么了。直接进入正题:
- This app is designed to run in the Heroku cloud or as a standalone Sinatra application.
需要安装的环境:
1. Ruby运行时
2. sinatra服务器
3. RubyOnRails框架
4. DevKit
__________________________________________________________
安装ruby:
https://www.ruby-lang.org/en/installation/
到这里找到windows的installer,下载下来运行即可。
安装完成后,需配置环境变量。如:在path中直接加E:\Ruby21-x64\bin
安装sinatra Github:
配置好环境变量后,在cmd中执行gem install sinatra,如果网速不给力可以试试换淘宝的ruby源。http://ruby.taobao.org/ ,页面中有相应的教程。
安装DevKit Github:
http://rubyinstaller.org/downloads ,页面下方找到对应系统的安装包,下载安装。
cmd中找到devkit的安装目录,执行ruby dk.rb 然后执行ruby dk.rb init ,再执行ruby dk.rb install
在devkit的安装目录中找到config.yml文件,在文件中插入ruby的路径,如:- E:/Ruby21-x64
安装RubyOnRails:
cmd中执行gem install rails
………………………………………………………………………………………………
环境配置大致需要这些,其中可能漏掉一些,在命令行中会有提示。
到Mindmup Github中下载下来项目。在cmd中先执行gem install foreman安装foreman,然后cd到下载下来的项目目录中,执行bundle install。
执行bundle会遇到一些问题,主要是mindmup需要的一些包没有安装,或者版本不正确,如果不能安装mindmup需要的版本的包,可以尝试安装
最新的包,然后修改gemfile和gemfile.lock中修改相应的版本信息。
安装eventmachine过程中,出现一些问题,试过了很多方法,这个可以解决问题。
However, I kept the project.h opened in textpad and tried to do gem install eventmachine. At one point, textpad will ask a confirmation to reload project.h as the new file is fetched from gem install command.. just give reload and comment the line //typedef int pid_t;.. Then the compilation went through..
打开eventmachine文件中的project.h文件,注释第97行,不要保存,然后在cmd中执行gem install eventmachine,在文本编辑提示project.h被外部修改是否载入的时候,立刻选择否,并保存修改。就会安装成功。
执行bundle install成功后,执行 foreman start
打开浏览器 输入localhost:5000 即可看到mindmup跑在本机