umar
umar

Reputation: 4389

how to deploy a sproutcore app with rails backend using capistrano?

My project code structure is as follows:

myapp/
  rails_code/
    app/ models/ views/ assets/ etc 
  sproutcore_code/
    sp/
      apps/ Buildfile etc

I deploy with capistrano, and I have the rails app set up with nginx and passenger on the server, so that the server's root directory is /path/to/myapp/rails_code/public, and it works. But the rails code is the backend. I need to set up the sproutcore code as well.

So how should i set up nginx for sproutcore code in the myapp/sproutcore_code/sp directory, and how should i change the cap deploy script to build the sproutcore app?

Upvotes: 0

Views: 369

Answers (1)

nathanvda
nathanvda

Reputation: 50057

I think what is most done that you actually move the sproutcore js to your app/assets/javascripts folder.

You should have some home-page, served by your rails-application that contains and starts the sproutcore application.

If you do it that way, you do not have to change anything to your deployment process.

I have posted a question recently asking for demo-applications with sproutcore, and found Travis-CI to be very informational for me. Not sure how you combine that with the actual sproutcore application development though.

[EDIT]: I found a good demo-project making things clearer: sproutcore-on-rails. Hope it helps you.

Since then I have looking more to spine.js, which has a direct integration with rails, and found that much easier to start with. They provide generators that builds a folder structure inside your app/assets/javascripts, and helps quick scaffolding.

Hope this helps.

Upvotes: 1

Related Questions