Windows Rails-IDE with Remote-File-Support (FTP/sFTP) - ruby-on-rails

I am currently using Aptana RadRails for Ruby on Rails development on my local system.
Now I want to work on a Rails-Application that is hosted on my dedicated server, but unfortunatly RadRails does not provide support for Remote File Access (apart from SVN).
Is there an IDE for Rails-Applications that gives me the ability to work on an application on my remote server transparently?

Is this what you're looking for?

You're doing it wrong!
Seriously, you should be using source control and you should be releasing your software with a deployment tool like vlad or capistrano.
You run your app locally, commit changes, then run deploys to your server. Once things are setup you shouldn't need to even log in to your server.
Developing the way you're doing is going to cause many headaches and reduce your productivity. Now the snide rails developer comment, if you really cared about productivity you wouldn't be using windows in the first place...

It's not available yet, but Haven will allow you to edit files via FTP/SFTP in your browser. It will also allow you to plug into your source control if that's where your stuff is. It should be a nice alternative to the current fat client options.
Disclaimer: I'm a co-founder of Wikid Labs.

Related

Deploy ruby on rails on FTP

Is it possible to deploy Ruby on Rails app on FTP?
If possible then how run migration on it?
My app also have a cronjob. How to set it?
How I deploy my webiste on FTP?
If any tutorial etc availble?
Technically it is possible to deploy by FTP, but the question is, why would you want to? It's a nightmare when compared to a modern, automated deployment system. There's also serious security concerns since FTP is not in any way encrypted and is extremely easy to crack into. Using public Wi-Fi exposes you to the risk of your credentials being captured.
The traditional way to deploy a Rails application is with Capistrano which handles packaging up your application through your version control system and rolling it on to your production system.
If you're not using a version control system that's the first thing you need to fix. Hacking away on files randomly and throwing them to a server over FTP produces quick results but over time it makes it very difficult to get a consistent, tested, reliable build over to your target server.
Remember that Rails is not something that runs automatically like .php files can be, you'll need to use something like Passenger to handle launching your application.
If all this seems a bit convoluted, it's worth trying Heroku to get started. They have a very streamlined approach.
If I understand right what you are asking (is it possible to run Ruby program using only FTP as a protocol), the answer is no, it is not possible. Ruby files is not Web static content (HTML, JS, CSS) that is executed in a browser and hence you can just upload it somewhere (as an option using FTP) and then access via Web. In case of Ruby, apart from uploading content you need to execute commands there (start interpreter, rake etc.) and this is not possible to do using plain FTP.
Normally you may want to use SSH channel to the deployment server to run the program after it has been uploaded. In that case upload is possible via FTP, but as well secure version of it, SFTP (or SCP to just copy files between local and remote machines).
Hope it helps.

Deploying Rails as a desktop application

I just start RoR development for two weeks, It's pretty amazing programming language so far. It's impressing me so much so that I'm start to thinking about change the programming language of my client's project from PHP to RoR. But what I want to know is, is it possible to make a RoR web app looks like a Native App when using it in a local machine. By the term of Native app I mean ..
The user doesn't have to run script/server or rails server every time they starts their machine
Either access it by Web Browser or something else is fine.
Can be running with Window 7 or Window XP
Other recommendation are welcome. (Including, the reason not to use RoR to develop a local application)
I personally don't think there's anything ridiculous with wanting to deploy a Rails app as a desktop application but it's certainly not the easiest thing to do. Heres a list of what you're going to need:
a compiled distributable ruby interpreter
a distributable database
a script to bootstrap the whole thing( preferably that runs on the click of an icon or when system starts)
an installer
optionally:
write a simple shell in qt or java(possibly with the ruby bindings even) that handled starting and stopping the rails app, and provided a webframe for your customer to use instead of the standard web browser.
Here's a tutorial on deploying a rails app as a desktop app, though for debian, that should start you in the right direction. But your best bet for a quick gui application in ruby is shoes.
since rails is framework for web development there is no way to avoid starting rails server to show something on local machine. you might hide the fact that server is being started by running it as service without letting the user know about it but that's only as far as you can get.
so yes, it is possible to bundle your application into a "native app" but i'm afraid it will be extremely fragile as there are too many pieces that need to fit together: ruby itself, database to use, rails and all the other gems. big chance is you will have a gem that needs to be compiled and then you're in trouble.
bottom line: it's not worth it, either host your app or pick a better solution to develop something that runs only locally.
Maybe out of topic, but if you want to make native application, perhaps make native application? I mean, what's the purpose to develop a web application and then host it locally?
At least, you could consider using free hosts, such as heroku. http://your-project-name.heroku.com will grant you a 5mb database and 1 worker. It's free, will save you a lot of troubles and will make it easier for you to deploy newer version to your clients.
Just have them put a bookmark on their desktop if they want to double click to open application.
Maybe I am wrong but you seem to miss the fact that RoR is not a programming language. Ruby is a programming language and RoR is web-development framework. Anyway if you want to develop desktop applications, you can use Ruby with a framework such as Bowline (to keep the MVC spirit).
If you want a Web application, build a Web application. If you want to build a desktop application, try Monkeybars or Appcelerator.
Quite late for my answer but anyway I had the same problem and use the gem ocra to build an exe for windows.
It is also possible to generate a setup to install the program in the register.
It is still necessary to have a server started but the user has just to click on the exe program; A console is opened and give some instructions like 'after the start of the server, open a browser and go to localhost:3000; Ctrl + C to exit when you have finished.
It could be possible to have the server launched as a service but I think my users prefer to know if the program is running or not.
ocra is not really easy to set but eventually it works fine.

Preferable way to distribute a Rails app

Although Rails and PHP have different deployment methods, what is the preferable way to distribute a FOSS Rails app? Suppose one of the major PHP apps - Magento, Drupal, Wordpress had been build upon RoR, what would have been the preferable way for them to have distributed their application?
Packaging up the code as a gem seems to be the wrong approach for a complete out-of-the-box application, but I could be wrong.
Coming from the world of PHP with its upload-and-go approach, and being a newcomer to Rails, it's rather opaque at the moment to see how code could be easily and effectively distributed.
Packaging a completed Rails app as a gem is probably the wrong approach. I think the best solution is to provide access to a git repository or a tarball of your git repo.
If you want to offer your users something more than rake db:schema:load to setup your app it's pretty easy to create custom setup commands.
Many applications are packaged with the source code just like typical PHP applications. While deploying Rails applications may seem difficult its expected that the user will know how to set up the server properly according to their environment and needs. The only issue you need to worry about is distributing the code, setting up the server is not a domain that you are going to want to help with.
For information on deployment in Rails you should see the deployment page here.
Well, usually Rails apps run in environment running Apache + Passenger (aka mod_rails).
Deployment is easily done with Capistrano gem.
When you're running Rails app in shared host environment, they usually use fcgi/cgi dispatchers to run Ruby.

How do I deploy my Rails Application

I've been spending the last few months on developing a (my first) Rails application all by my self, just me and my Linux box, all in my development RAILS_ENV, no SCM ("for shame!") or anything. It has become quite the beast now and I am getting ready to release it onto the world. My question is: how am I ever going to make this work?
I installed gems, plugins, servers (MySQL, node.js, nginx, sphinx, juggernaut), photo compression apps that I call, video compression tools (FFMPEG) etc, I also obviously have a DB and a (lot of) seed data. I can't even remember all the things I did to my system to make it all work, but it does.
So now, when I deploy this on some stranger's server, how do I make sure that all those things get installed and configured correctly? How is e.g. FFMPEG ever going to get installed on this server when I deploy my application. How will the seed data get uploaded, how will the servers get started, with the right parameters etc.
I have read (a little bit) about Capistrano which seems to be the deployment tool of choice in the Rails community, but I am not sure if that will cover all my needs. For example, how do I figure out all the gems I used or the plugins (do I even need to know?). Is there any way I can test the deployment on my own linux box,the same I am developing on, i.e. pretend that I am hosting my own production server/rails_env and "deploy" it there?
Any help will be much appreciated.
Cheers.
There a lot of standards to follow that make life easier...
As far as figuring out which gems you need, you could try and use RVM and make a local config that you keep adding gems to until your app works. This will be kind of like starting from scratch so that you are sure to know precisely what configuration you need to run. (And it should make it easy to stand up a new, identical environment each time.)
The RVM route will allow you to test in a specific environment, which should help.
You can list the required gems in your environment.rb file so that the server demands them on start-up.
Good Luck, Cowboy .

Distributing Rails Applications as Native Applications

I would like to distribute a rails application as a double clickable application. 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. Do I need to distribute ruby? Initially I'm looking to target the mac and linux for distribution. Does anyone have any experience packaging rails application like this?
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. 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.
I've decided to use jruby and look into packaging the application as a java app.
The ill-fated Joyent Slingshot did exactly that, it allowed you to embed your Rails application as a standalone executable under Windows and 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
Spiceworks is a desktop-deployed Rails app, or at least it was a couple of years ago. It's a free (ad-supported) download.
Appcelerator Titanium natively supports building client-based/desktop applications using Ruby.
Hey, take a look at shopify and their theme designer app. http://vision.shopify.com/
Is pretty much exactly what your talking about. All they have done is written a stub for both platforms that launches the rails project. You can take a look at the code that checks for the rails project browsing through the vision app package contents.
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. Has anyone had a look at Titanium Desktop from Appcelerator (http://www.appcelerator.com/)? I tried it initially and there was a little fiddling required, but the end result was more or less a desktop app.
If you want to write desktop apps, write desktop apps, if you want to write web apps, write web apps.
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. 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 is also exciting because of the work on the AOT compiler, with which you can compile Ruby code to machine code.

Resources