Programing

Windows에서 Ruby / Rails 실행시 제한 사항

lottogame 2020. 10. 8. 07:38
반응형

Windows에서 Ruby / Rails 실행시 제한 사항


RoR에 대한 설치 문서에는 Windows에서 Ruby on Rails를 실행하는 데 많은 제한이 있으며 경우에 따라 전체 라이브러리가 작동하지 않는다고 언급되어 있습니다.

이러한 제한은 얼마나 나쁜가요? RoR을 코딩 / 실행하기 위해 항상 Linux를 기본으로 설정해야하며 Iron Ruby가 이러한 제한을 수정할 것으로 예상됩니까 아니면 OS 자체의 핵심입니까?

편집 설치 및 Linux에서 실행에 대한 답변에 감사드립니다. 그러나 설치 설명서 및 작동하지 않는 라이브러리에서 참조한 기능의 한계를 이해하려고 노력하고 있습니다. 주석에 대한 링크를 찾으려고합니다. 내가 생각하는 msi 패키지를 설치할 때 설치에서 참조

편집 최근 IronRuby에 대한 참조에 감사드립니다.이 프로젝트는 확실히 지켜봐야 할 프로젝트이며, 분명히 .NET 언어이기 때문에 약속에 부합한다면 매우 귀중 할 것입니다. 그러나 결국 제 경우에는 총알을 깨고 우분투 서버를 설치했습니다.

<bias> 몇 년 전에 했어야 했어요 </ bias>


다음은 Windows 기반 Rails의 현재 문제에 대한 개요입니다.

  • Ruby와 Rails는 Unix와 유사한 OS보다 Windows에서 느립니다.
  • 일부 보석 및 라이브러리는 Windows에서 작동하지 않습니다.
  • 일부 Unix-ism은 Windows에서 사용할 수 없습니다 ( ).
  • 커뮤니티는 대부분 Mac 또는 Linux에 있습니다. ( 이것은 특히 다루기 어려운 문제입니다. 나머지 부족이 파티를하고, 즐겁게 지내고, 다른 섬에서 잘 지낼 때 아무도 한 섬에 혼자 있고 싶어하지 않습니다. 중요 레일로 시작하는 대부분의 Windows 개발자들이 신속하게 맥 또는 리눅스로 전환 할 것으로 보인다.. 그러나 , 지속 않는 윈도우 루비 사용자의 작은 지역 사회는 매우 전용, 친절하고 지식 - 인사를 이동합니다 . )

Windows의 Ruby에 안정성, 호환성 및 성능을 제공 하려는 RubyInstaller엄청난 노력으로 인해 다음과 같은 많은 조언이 구식 입니다. 저는 더 이상 VirtualBox를 사용할 필요가 없습니다. 이것은 Windows에서 Ruby가 얼마나 발전했는지에 대해 많은 것을 알려줍니다.

더 자세한 기술 정보를 원하면 다음을 읽어야합니다. :

마지막 인용문의 선택은 다음과 같습니다.

AkitaOnRails : 가장 명백한 것은 Windows에 적합한 바이너리가없는 C 확장이있는 Gem이 실패한다는 것입니다. 쉘 명령을 실행하려고하면 실패하고 RubyInline도 실패합니다. 또 뭐야?

Luis Lavena : Hehe, 그건 빙산의 일각에 불과합니다.

모든 것을 말했지만 Windows에서 Rails로 개발하는 것이 너무 고통 스럽지는 않습니다. 루비를 사용하는 것은 대부분 즐거움입니다. 솔직히 말하면 원 클릭 설치 프로그램을 사용하여 Ruby를 올바르게 설치 한 다음 gem install rails. Apache와 MySQL이 필요하다면 WAMP 가 좋은 선택이 될 것입니다. Mongrel과 SQLite를 고수하는 경우에는 필요하지 않습니다.

내가 최근에 수행 한 작업 은 배포 서버를 밀접하게 미러링하는 Ubuntu Server 인스턴스로 VirtualBox실행 하는 것입니다. 네트워크 드라이브를 Ubuntu Server에 매핑 한 다음 VM에서 직접 코드를 편집하고 실행합니다. 메모리를 거의 사용하지 않으며 (현재 43MB를 사용하고 있으며, Firefox가 230MB를 사용하는 것과 대조적으로) Rails는 Windows에서 기본적으로 실행하는 것보다 실제로 더 나은 성능을 발휘합니다. 또한 상대적으로 안전한 가상 서버를 실험 할 수 있습니다. 정말 멋진 설정입니다. 적극 권장합니다.

마지막으로, 다음은 Windows 사용자를 대상으로하는 Ruby / Rails 블로그입니다.


Windows에서 Instant Rails사용하여 개발 환경을 설정하고 실행하는 것이 정말 간단 하다는 것을 알았습니다 . 특히 Netbeans 또는 Radrails 를 IDE로 사용할 때 .

10 분 미만의 작업.

어려움을 겪은 사람들은 무엇이 문제임을 알게 되었습니까?


아무도 아직 Bitnami RubyStack을 언급 하지 않았습니까? 나는 RadRails와 함께 수년간 그것을 사용해 왔습니다. Apache, MySQL / Postgre, phpmyadmin, git 등을 포함합니다. 선택적인 Ruby 1.9.2 / Rails 3.0b. VM에서 RubyStack의 Ubuntu 버전을 실행할 수도 있지만 아직 시도하지 않았습니다.


저는 몇 년 동안 Windows PC에서 Rails를 개발해 왔으며 처음 시작할 때 다시 설치할 때 실제로 문제가 없었습니다. 그러나 최근에 컴퓨터를 다시 빌드하고 One-Click Ruby 설치 프로그램과 최신 버전의 Gems를 사용하는 데 어려움을 겪었습니다. 그래서 이것이 제가 시도한 것입니다.

옵션 1 : Linux 가상 머신 실행

저는 Linux 가상 머신 내에서 Rails를 실행하는 Charles Roper의 아이디어에 정말 감명을 받았으며 이것이 제가 처음에 갔던 경로입니다. 모든 것이 순조롭게 진행되었으며 budanters.blogspot.com 에서 문서화했습니다 . 그러나 Windows 호스트에서 MySQL 서버 (Linux Virtual Machine)에 액세스하는 데 어려움을 겪고 있습니다.

옵션 2 : jRuby 사용

최근에 NetBeans 6.5 Ruby 번들 의 Windows 버전을 설치했는데 알지 못하는 사이에 JRuby와 Rails gem이 설치됩니다. IDE에는 Gems를 설치할 수있는 UI가 있으며 이제 개발 환경에서 이전 애플리케이션을 백업하고 실행하고 있습니다.

2009 년 11 월 업데이트

저는 현재 Windows에서 Netbeans 6.7을 사용하고 있으며 전체적으로 매우 만족합니다. 유일한 단점은 JRuby 1.2를 설치하고 작업을 수행하기 위해 수동으로 JRuby 1.3을 설치해야한다는 것입니다. VladJRuby에서 작동하지 않는 Open4사용합니다 .

2010 년 5 월 업데이트

Netbeans 6.8 comes with JRuby 1.4 so no longer have to fiddle around with manually installing JRuby 1.3. Also it seems that in JRuby 1.5 Open4 will now work, which means Vlad might start working.


There is a packaged installer available at http://railsinstaller.org/ which is worth checking out.


Personally I found getting Ruby + Rails up and running on windows a piece of cake. From download to browsing to my first 'HelloWorld' app took me all of 15 minutes. I didn't even bother with any of the InstantRails stuff.

Subsequently I can't say I encountered any of the reported speed problems or issues with Gems under Windows.

These guys also do a nice Ruby developers add on for Visual Studio:

http://www.sapphiresteel.com/


When I last fiddled around with Rails on windows, I used Instant Rails and found it to be a fairly painful process, except for the lack of updates to Instant Rails (which, from the look of the website is still a little bit of a problem, as instant Rails 2.0 uses ROR 2.0, while the newest version is 2.1). You might also look into the answers to this question as it mentions a number of other ways to get RoR running on windows easily.


You have windows options for getting everything up and installed, such as Instantrails:

However, my personal experience with trying to get colleagues up and running on windows is that it's a pretty painful experience. You should be able to get most (if not everything) running, but be prepared to spend a bit of time mucking round (and getting frustrated).

YMMV

I would probably recommend either Linux or Mac for rails development (but I'm slightly biased against windows, so you may need to take that with a grain of salt).


An option if you're stuck on Windows is to have virtual servers running Linux / BSD / what-have-you.

It solves lots of other problems also (allowing you to try multiple server configurations easily, etc.).


If you can't get away from windows use VMware and run some form of linux (ubuntu is popular). Your No.1 limitation will be compiled gems which do not play nicely on windows.

The majority of tutorials assume you're on some form of *nix, it's when you start to break outside of basic scaffolding when you'll feel the pain. Image manipulation, full-text search and even some db adapters will either only run on *nix or are a pain to setup.

The majority of web hosts run linux too, it's good to be developing on the same platform as your host, to avoid deployment headaches.


In general, Rails performance is a problem on Windows.

As far as your deployment setup, you can either run Rails in FCGI or use mongrel (and set up either Apache or IIS as a proxy). mod_rails (http://www.modrails.com) is the best deployment option for Rails today, but doesn't run on Windows.

You might find more luck using JRuby on Windows to run Rails in whatever JVM environment you want (tomcat, J2EE server, etc).

IronRuby isn't there yet to run Rails in a production environment, but eventually it will be aimed at running Rails inside any ASP.NET environment (IIS).


You could just use Cygwin and it's version of Ruby. That gets rid of the arguments about compiled gems not working on Windows - I've managed to compile a lot of gems that way.


The biggest limitation of running under Windows is that a lot of things are super slow.

See this thread. For a discussion.

Simple things like "script/console" and running rake tasks will take 5 times longer on Windows than they do on Linux or Mac.

Other limitations are:

  • No IE6 on Vista.
  • BackgroundRB and a many other c based gems do not work on Windows.
  • No passenger

I'm not a rails developer myself but I thought this may be of interest. Microsoft has released IronRuby 1.0, it's a version of Ruby that runs on the .NET platform that apparently runs 4x faster than the official Rails implementation on Windows.

http://www.drdobbs.com/open-source/224600662

Official site http://ironruby.codeplex.com/


For a speedup you could try my loader speeder upper (helps rails run faster in doze): https://github.com/rdp/faster_require Also checkout spork, which works in doze


Alternative of RailsIntaller is RailsFTW. The Ruby & Rails are more updated.

참고URL : https://stackoverflow.com/questions/164896/limitations-in-running-ruby-rails-on-windows

반응형