개발관련 - 해당되는 글 27건

[원문링크]

https://docs.microsoft.com/ko-kr/dotnet/csharp/language-reference/compiler-messages/cs1690



      개발관련  |  2018. 5. 9. 01:26




다양하게 seed 설정이 필요할때 사용할 수 있는 예


rake db:seed                    # Load the seed data from db/seeds.rb, db/seeds/*.seeds.rb and db/seeds/ENVIRONMENT/*.seeds.rb. ENVIRONMENT is the current environment in Rails.env.
rake db:seed:bar                # Load the seed data from db/seeds/bar.seeds.rb
rake db:seed:common             # Load the seed data from db/seeds.rb and db/seeds/*.seeds.rb.
rake db:seed:development        # Load the seed data from db/seeds.rb, db/seeds/*.seeds.rb and db/seeds/development/*.seeds.rb.
rake db:seed:development:users  # Load the seed data from db/seeds/development/users.seeds.rb
rake db:seed:foo                # Load the seed data from db/seeds/foo.seeds.rb
rake db:seed:original           # Load the seed data from db/seeds.rb



      개발관련/RubyOnRails  |  2016. 10. 6. 15:52




1. screen화면에서 빠져 나올때 :  (control + a) + d

2. screent화면으로 다시 들어갈때 ( reattach)

    : screen -r name

     

위의 이미지에서 5759.pts-1.xxxxxx 로 시작하는 것이 현재 deattach 되어 있는 프로세스이다

여기에서

screen -r 5759.pts-1.xxxxxx 명령을 하면 해당 screen 으로 돌아간다.

 


      개발관련/Linux 일반  |  2016. 10. 4. 15:24




텐서 플로우 첫걸음 책을 따라서 겨우겨우 노트북(Macbook. OSX Sierra:10.12) 에 설치를 마치고,

두번째 예제를 따라하는 중에 matplotlib를 이용하여 그래프 출력에서 문제가 발생

1. 라이브러리가 없음

    pip install matplotlib

2. 에러 메시지....

    

위와 같은 에러...

stackoverflow에 위의 문제를 잘 해결해 놓았네..

==>  http://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python


해결책은

  • I assume you have installed the pip matplotlib, there is a directory in you root called ~/.matplotlib.
  • Create a file ~/.matplotlib/matplotlibrc there and add the following code: backend: TkAgg

실행 잘됨.!!!

      개발관련/OSX  |  2016. 10. 1. 20:17




[원문 사이트]

http://macnews.tistory.com/3728


------------------------------------------------------------------------------------------------------

'홈브류(Homebrew)'가 깔리지 않거나 문제가 생길까봐 OS X 엘 캐피탄 설치를 주저하고 계신다면, 주저하지 마시고 업그레이드를 진행하세요.

새 OS X에 '루트리스'라고도 불리는 '시스템 무결성 보호(System Integrity Protection)'가 도입되면서 몇 가지 주의할 점이 생겼지만, 일단 설치만 완료하면 기존 작업 환경을 그대로 유지할 수 있습니다. /System 폴더를 비롯해 다수의 시스템 폴더에 대한 액세스가 막힌 반면에, 홈브류가 설치되는 장소인 /usr/local 폴더는 시스템 무결성 보호의 영향을 받지 않기 때문입니다.

* Apple - Security and Your Apps

깃허브 문서를 참고해 OS X에 홈브류를 설치하는 방법을 상황별로 정리해 봤습니다.

상황 1. OS X 10.11 El Capitan을 새로 설치 했다면

맥이 공장 출하 상태이거나 기존의 볼륨을 포맷하고 OS X을 클린 설치했다면 애플이 제공하는 '명령어 라인 도구(Command Developer Tools)'만을 이용해 홈브류를 설치할 수 있습니다. 터미널을 실행한 뒤 콘솔을 열고 아래 명령어를 입력하면 됩니다. ▼

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

상황 2. 이미 /usr/local 폴더가 존재하는 경우

운영체제를 업그레이드 하기 전에 홈브류를 설치한 적이 있다면 /usr/local 폴더가 생성돼 있을 겁니다. 그런데 새 OS X이 설치되면서 해당 폴더의 퍼미션이 변경됨으로 인해 접근이 막히는데요. 권한을 원래대로 조정하면 홈브류를 정상적으로 이용할 수 있습니다. 콘솔에 다음과 같은 명령어를 입력하면 끝입니다. ▼

sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local

상황 3. /usr/local 폴더가 존재하지 않는 경우

가장 골치아픈 상황인데요. 홈브류를 설치할 정도라면 무난히 클리어하시리라 믿습니다.

1. 홈브류가 설치될 /usr/local 폴더를 생성하기 위해 시스템 무결성 보호를 꺼야 합니다. 맥을 시동할 때 command 키와 R키를 동시에 눌러 시스템 복구 모드로 들어간 다음 유틸리티 메뉴에서 터미널을 시작합니다. ▼

2. 콘솔에 다음과 같은 명령어를 입력해 시스템 무결성 보호를 비활성합니다. (모든 작업이 끝나면 다시 활성화하셔도 됩니다.) ▼

csrutil disable

3. 복구 모드에서 나와 맥을 OS X으로 다시 시동하세요. 터미널을 실행한 뒤 아래 명령어로 /usr/local 폴더를 생성하고 퍼미션을 조정합니다. ▼

sudo mkdir /usr/local && sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local

4. 이제 정상적인 절차로 홈브류를 설치하면 됩니다. ▼

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

홈브류가 /usr/local 폴더에 잘 설치되었는지 확인하세요. 이후 사용자의 필요에 따라 시스템 무결성 보호를 다시 활성화(csrutil enable)하면 모든 작업이 완료됩니다. ▼


      개발관련/OSX  |  2016. 10. 1. 16:36




https://github.com/stympy/faker#fakerlorem


      개발관련/RubyOnRails  |  2016. 8. 26. 11:52




rails s -e production 명령시 아래와 같이 에러 발생..

.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)


원인은 mysql2 에서 0.4.X 버전의 문제인지 호환성 문제인지. 해당 버전은 문제가 있음.

현재까지의 결론은 0.3.X 버전을 사용하면 해결됨.

막연하게 설치된 mysql2 를 제거하려니.. 이렇게 다양한 버전이 설치되어 있었음..

mysql2-0.3.20 을 제외한 다른 버전은 먼저..제거.

Gemfile 에 다음과 같이 설정.

  =>  gem 'mysql2', '~> 0.3.20'

문제 해결!!!

      개발관련/RubyOnRails  |  2015. 10. 2. 11:43




1. Error libv8

[Error Msg]

An error occurred while installing libv8 (3.16.14.11), and Bundler cannot continue.

Make sure that `gem install libv8 -v '3.16.14.11'` succeeds before bundling.

[Solv]

gem install libv8 -v '3.16.14.11' -- --with-system-v8






      개발관련/RubyOnRails  |  2015. 9. 7. 23:53




      개발관련/OSX  |  2014. 10. 30. 14:50




[파일 확장자 일괄변경]

=> JPG 확장자를 jpg로 일괄변경..

  find ./ | grep JPG | sed "s/\(.*\)\.JPG$/mv '&' '\1.jpg' /" | sh   


      개발관련/Linux 일반  |  2014. 4. 10. 15:56



blesscdh's Blog is powered by Daum & Tattertools