gem install eventmachine -v '1.0.8' -- --with-cppflags=-I/usr/local/opt/openssl/include
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class API::V1::BaseController < ApplicationController | |
| skip_before_filter :verify_authenticity_token | |
| before_filter :cors_preflight_check | |
| after_filter :cors_set_access_control_headers | |
| def cors_set_access_control_headers | |
| headers['Access-Control-Allow-Origin'] = '*' | |
| headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready -> | |
| $('form').on 'keypress', (e) -> | |
| if e.keyCode == 13 | |
| return false |
curl https://www.openssl.org/source/openssl-1.0.2l.tar.gz | tar xz && cd openssl-1.0.2l && sudo ./config && sudo make && sudo make install
sudo ln -sf /usr/local/ssl/bin/openssl /usr/bin/openssl
openssl version
#=> OpenSSL 1.0.2l 25 May 2017
要用rails 5 的 puma 跑ssl 首先會碰到一個問題
新版的 mac os 好像用了openssl然後之前用homebrew裝的openssl就不能用了,
keg-only 就是不幫你連起來,你也不要連,會壞掉
裝了之後在termal打的指令都是用系統內建版本在執行
但是你可以用brew的版本compile一些需要build local的gem
found solution on the link below
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/dylan/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8.1/ext/nokogiri
/Users/dylan/.rbenv/versions/2.3.3/bin/ruby -r ./siteconf20170419-54813-jzpam3.rb extconf.rb --use-system-libraries
checking if the C compiler accepts ... yes
while fixing termainal-notifier, I excute gem clean --force and now need to bundle on every project
Then I ran into a problem while install mysql2
~/Projects gem install mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Process: Electron [42482] | |
| Path: /Applications/Visual Studio Code.app/Contents/MacOS/Electron | |
| Identifier: com.microsoft.VSCode | |
| Version: 1.11.2 (1.11.2) | |
| Code Type: X86-64 (Native) | |
| Parent Process: ??? [1] | |
| Responsible: Electron [42482] | |
| User ID: 501 | |
| Date/Time: 2017-04-19 19:34:20.179 +0800 |
16:06:51 - INFO - LiveReload is waiting for a browser to connect.
16:06:51 - INFO - Guard::RSpec is running
16:06:51 - INFO - Guard is now watching at '/Users/dylan/Projects/TargetGlobal'
[1] guard(main)>
16:06:57 - INFO - Run all
16:06:57 - INFO - Running all specs
/Users/dylan/.rbenv/versions/2.3.3/lib/ruby/2.3.0/json/version.rb:4: warning: already initialized constant JSON::VERSION
/Users/dylan/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/json-2.0.2/lib/json/version.rb:4: warning: previous definition of VERSION was here
/Users/dylan/.rbenv/versions/2.3.3/lib/ruby/2.3.0/json/version.rb:5: warning: already initialized constant JSON::VERSION_ARRAY
gem uninstall terminal-notifier
brew uninstall terminal-notifier
brew install terminal-notifier