본문 바로가기
728x90
반응형

RUBY11

[Replit] Ruby Version(루비 버전) 변경하는 방법 replit에 nix가 언제 도입되었는지는 모르겠지만, 간단하게 Ruby버전을 왔다 갔다 할 수 있는 방법을 공유하려고 한다. azure에서 기본적으로 제공하는 버전이 2.7.3밖에 없기 때문에 replit쪽의 버전을 바꾸는 수 밖에 없었다. 우선! 아래 사이트에서 원하는 ruby버전을 찾아보도록 한다. 나같은 경우는 2.7.3이었다. https://lazamar.co.uk/nix-versions/?package=ruby&version=2.7.3&fullName=ruby-2.7.3&keyName=ruby&revision=860b56be91fb874d48e23a950815969a7b832fbc&channel=nixpkgs-unstable#instructions Nix Package Versions Find.. 2022. 11. 1.
VSCode 랑 Minitest쓰는 방법 오늘 어떤 rails 프로젝트를 포크해서 쓰고 있는데, 실제로 main ruby에서 TDD를 하기 위한 gem 중에 유명한건 rspec하고 minitest가 있는데, 이것들을 VScode의 text explorer에 띄우기 위해서 무엇을 해야하는지 튜토리얼 식으로 적어보려고 한다. 1. .vscode/settings.json을 만든다. 2. json 포맷으로 다음을 작성한다 { // for coding convention "editor.tabSize": 2, "editor.insertSpaces": true, "rubyTestExplorer.logpanel": true, "rubyTestExplorer.testFramework": "minitest", "rubyTestExplorer.minitestCom.. 2022. 1. 24.
Ruby - String에서 Number성분만 추리기 https://stackoverflow.com/questions/2640819/extract-number-from-string-in-ruby/59238529 Extract number from string in Ruby I'm using this code: s = line.match( /ABCD(\d{4})/ ).values_at( 1 )[0] To extract numbers from strings like: ABCD1234 ABCD1235 ABCD1236 etc. It works, but I wonder what other alternative I h... stackoverflow.com 그중에서 line.delete("^0-9") 이게 제일 간단하고 좋아보임! 2021. 12. 29.
루비로 작성된 다양한 라이브러리 찾고 배워보기 https://github.com/search?q=language%3ARuby+stars%3A%3E100+pushed%3A%3E2019-01-01&type=Repositories&ref=advsearch&l=&l= GitHub: Where the world builds software GitHub is where over 73 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat... github.com [RoR] 1. Discourse https:/.. 2021. 12. 12.
728x90
반응형