SuperBaboon's Blog

A blogging framework for hackers.

常用技术链接

Java

Akka

搜索

支付宝

淘宝

如何编写和发布博客

开启本地监听和http服务器

新建文章

  • rake new_post[‘{post name}’]

注意:文件名命名规则,参考这里

发布

  • rake generate — 根据源文件生成目标文件
  • rake deploy — 发布到github
  • git push origin source — 记录修改内容

Done!

常用mac执行命令

启动mysql

1
sudo /usr/local/mysql/bin/mysqld_safe

重新设置root密码

1
2
3
4
1. sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
2. mysql -u root
3. UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
4. FLUSH PRIVILEGES;

清理rvm

1
2
3
1. rvm implode
2. 确保~/.rvm和/usr/local/rvm目录已经被删除
3. 确保~/.bashrc,~/.bash_profile, ~/.zshrc,~/.profile相关的内容已经删除

How-to-setup-octopress

参考octopress官方安装文档

名字解释

  • rvm:ruby version manager
  • gem:package manager for the Ruby programming language

系统环境

  • OSX EI Capitan 10.11.1

install rvm

1
curl -L https://get.rvm.io | bash -s stable --ruby

install ruby

安装最新OSX EI Caption最新版本的ruby版本2.3.0

1
rvm install 2.3.0

出现下面的错误

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Error running '__rvm_make install',
showing last 15 lines of /Users/junjiewu/.rvm/log/1456294025_ruby-2.3.0/install.log
    from ./tool/rbinstall.rb:686:in `block in <class:Installer>'
    from ./tool/rbinstall.rb:754:in `block (2 levels) in <main>'
    from /Users/junjiewu/.rvm/src/ruby-2.3.0/lib/rubygems/specification.rb:821:in `block in each_spec'
    from /Users/junjiewu/.rvm/src/ruby-2.3.0/lib/rubygems/specification.rb:743:in `block (2 levels) in each_gemspec'
    from /Users/junjiewu/.rvm/src/ruby-2.3.0/lib/rubygems/specification.rb:742:in `each'
    from /Users/junjiewu/.rvm/src/ruby-2.3.0/lib/rubygems/specification.rb:742:in `block in each_gemspec'
    from /Users/junjiewu/.rvm/src/ruby-2.3.0/lib/rubygems/specification.rb:741:in `each'
    from /Users/junjiewu/.rvm/src/ruby-2.3.0/lib/rubygems/specification.rb:741:in `each_gemspec'
    from /Users/junjiewu/.rvm/src/ruby-2.3.0/lib/rubygems/specification.rb:819:in `each_spec'
    from ./tool/rbinstall.rb:751:in `block in <main>'
    from ./tool/rbinstall.rb:801:in `block in <main>'
    from ./tool/rbinstall.rb:798:in `each'
    from ./tool/rbinstall.rb:798:in `<main>'
make: *** [do-install-nodoc] Error 1

解决方式,退回到安装2.2.1版本

1
2
3
rvm install 2.2.1
rvm use 2.2.1
rvm rubygems latest

顺利执行完毕,然后执行以下命令

1
2
gem install bundler
bundle install

执行bundle install各种类似以下的错误

1
2
An error occurred while installing sass-globbing (1.0.0), and Bundler cannot continue.
Make sure that `gem install sass-globbing -v '1.0.0'` succeeds before bundling.

解决的方式是不断的按照它的提示执行命令,然后不断的执行bundle install

最后执行

1
rake install

Done!