简体   繁体   English

将Rails应用程序分发为本机应用程序

[英]Distributing Rails Applications as Native Applications

I would like to distribute a rails application as a double clickable application. 我想将rails应用程序作为双击应用程序分发。 When someone double clicks on the app, I think that mongrel should be started and then the user's browser should be started and open to something like localhost:3000 I'm trying to work through what I will need to do this, I think I'm going to need to include a copy of rails in the project, and a copy of the gems. 当有人双击应用程序时,我认为应该启动mongrel,然后应该启动用户的浏览器并打开类似localhost:3000的东西我正在努力完成我需要做的事情,我想我我需要在项目中包含一个rails副本,以及一个gem的副本。 Do I need to distribute ruby? 我需要分发红宝石吗? Initially I'm looking to target the mac and linux for distribution. 最初我希望以mac和linux为目标进行分发。 Does anyone have any experience packaging rails application like this? 有没有人有这样的包装rails应用程序的经验?

The Application I'd like deploy is a media center server for a user's media. 我要部署的应用程序是用户媒体的媒体中心服务器。 Unfortunately this means I can't have a public server serving out the media. 不幸的是,这意味着我无法使用公共服务器来提供媒体服务。 I've built up the server using ruby on rails and rake tasks to import and manage the media. 我使用ruby on rails和rake任务来构建服务器以导入和管理媒体。 Is there a good way to make this easy for users to install? 有没有一种方法可以让用户轻松安装? The idea was with a double clickable application it would be easy for users to bring up and down the server. 这个想法是使用双击应用程序,用户可以轻松地启动和关闭服务器。

我决定使用jruby并将应用程序打包为java应用程序。

The ill-fated Joyent Slingshot did exactly that, it allowed you to embed your Rails application as a standalone executable under Windows and Mac. 命运多Joy的Joyent Slingshot正是如此,它允许您将Rails应用程序嵌入Windows和Mac下的独立可执行文件中。 It even provided a simple but straightforward method to allow data synchronization with an online version. 它甚至提供了一种简单但直接的方法,允许与在线版本进行数据同步。 Alas, it hasn't seen any activity in a long time. 唉,很长一段时间没有看到任何活动。

https://dev.joyent.com/projects/slingshot/wiki/Slingshot https://dev.joyent.com/projects/slingshot/wiki/Slingshot

Spiceworks is a desktop-deployed Rails app, or at least it was a couple of years ago. Spiceworks是一个桌面部署的Rails应用程序,或者至少在几年前。 It's a free (ad-supported) download. 这是免费(广告支持)下载。

Appcelerator Titanium本身支持使用Ruby构建基于客户端/桌面的应用程序。

Hey, take a look at shopify and their theme designer app. 嘿,看看shopify和他们的主题设计师应用程序。 http://vision.shopify.com/ Is pretty much exactly what your talking about. http://vision.shopify.com/几乎就是你所说的。 All they have done is written a stub for both platforms that launches the rails project. 他们所做的就是为启动rails项目的两个平台编写了一个存根。 You can take a look at the code that checks for the rails project browsing through the vision app package contents. 您可以查看检查通过视觉应用程序包内容浏览rails项目的代码。

I agree with the previous posters regarding desktop apps but I find myself writing web apps for the desktop (mostly widgets using Fluid) so I understand the issue. 我同意之前关于桌面应用程序的海报,但我发现自己正在为桌面编写Web应用程序(主要是使用Fluid的小部件),所以我理解这个问题。 Has anyone had a look at Titanium Desktop from Appcelerator ( http://www.appcelerator.com/ )? 有没有人从Appcelerator( http://www.appcelerator.com/ )看看Titanium Desktop? I tried it initially and there was a little fiddling required, but the end result was more or less a desktop app. 我最初尝试过它并且需要一些小小的东西,但最终结果或多或少是一个桌面应用程序。

In the future, I think MacRuby will provide an excellent way to run web-apps on the desktop (well I mean OS X desktop) - you could in theory, spin up a Rails app and then have a WebView point to the Rails app. 在未来,我认为MacRuby将提供一种在桌面上运行网络应用程序的绝佳方式(我的意思是OS X桌面) - 理论上,您可以启动Rails应用程序,然后使用WebView指向Rails应用程序。 Currently, they're still focusing on making MacRuby a first-class citizen of the OS X ecosystem but Rails support is on the roadmap. 目前,他们仍然专注于使MacRuby成为OS X生态系统的一流公民,但Rails支持是在路线图上。

MacRuby is also exciting because of the work on the AOT compiler , with which you can compile Ruby code to machine code. 由于AOT编译器的工作,MacRuby也很令人兴奋,您可以使用它编译Ruby代码到机器代码。

如果您想编写桌面应用程序,编写桌面应用程序,如果您想编写Web应用程序,请编写Web应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM