跳到主要內容

發表文章

目前顯示的是 4月, 2018的文章

解決git push錯誤︰failed to push some refs to git

$ git push -u origin master To https://github.com/shawnkaku/postit.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/shawnkaku/postit.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. $ git pull --rebase origin master From https://github.com/shawnkaku/postit  * branch            master     -> FETCH_HEAD First, rewinding head to replay your work on top of it... Applying: init $ git push origin master Counting objects: 65, done. Delta compression using up to 4 threads. Compressing objects: 100% (55/55), done. Writing objects: 100% (65/65), 15.23 KiB | 2.54 MiB/s, done. Total 65 (delta 2), reused 0 (delta 0) remote: Resolving deltas: 100% (2/2), done.

How to set Ruby on Rails Environment in mac (mac OS)?

1. install xcode in apple App Stor 2. curl -L https://get.rvm.io | bash -s stable 3. rvm -v 4. echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.zshrc 5. rvm list known 6. rvm install 2.5.1 7. ruby -v 8. rvm rubygems current 9. gem -v 10. $ brew install git 11. $ git config --global user.name "YourName" 12. $ git config --global user.email "yourmail@gmail.com"  13. gem install bundler 14. gem install rails

Installing Passenger + Nginx

先查Ubuntu版本,指令會出現 Ubuntu 版本代碼。 lsb_release -a sudo apt-get install -y dirmngr gnupg sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7 sudo apt-get install -y apt-transport-https ca-certificates sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main > /etc/apt/sources.list.d/passenger.list' sudo apt-get update sudo apt-get install -y nginx-extras passenger 參考 Installing Passenger + Nginx  

How to set Ruby on Rails Environment in Linux (Ubuntu)?

Update your package manager first: $ sudo apt-get update This must finish without error or the following step will fail. Install  Curl : $ sudo apt-get install curl You’ll use Curl for installing  RVM . $ \curl -L https://get.rvm.io | bash vi ~/.bashrc # This loads RVM into a shell session. [[ - s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" restart terminal. $ rvm get stable --autolibs=enable $ rvm install ruby $ rvm use 2.5.1 --default Nodejs $ sudo apt-get install nodejs $ gem install bundler $ gem install nokogiri $ gem install rails $ rails -v $ rails new AppName $ cd AppName $ rails s

How to install sublime-text-3 on ubuntu?

To get started, press Ctrl+Alt+T to open terminal, then follow below steps: 1.) Add sublime-text-3 in the repository. sudo add-apt-repository ppa:webupd8team/sublime-text-3 2.) Update the system with apt-get command. sudo apt-get update 3.) And install the latest Sublime Text 3 in your system. sudo apt-get install sublime-text-installer