bulk_api icon indicating copy to clipboard operation
bulk_api copied to clipboard

Bulk install doesn't generate 'mount' route

Open trivektor opened this issue 13 years ago • 8 comments

I was following the guide here http://sproutguides-drogus.strobeapp.com/rails.html#rails-application to create a sproutcore + rails app. However, after I ran 'rails generate bulk:install', the second line 'route mount Bulk::Sproutcore.new => "/_sproutcore"' was not added to my route file.

trivektor avatar Nov 19 '11 18:11 trivektor

I'm issuing the same problem. I'm using the same rails version 3.0.7 as in guide, but it doesn't generate 'route mount Bulk::Sproutcore.new => "/_sproutcore"'

dastanko avatar Dec 27 '11 12:12 dastanko

It's the problem of the readme, not the gem. There's a commit, where Piotr deletes that row from the generator. If you want to use SC1, that's is discussed in the guide, use sc1 branch. Generator there is the same as in the guide.

ulitiy avatar Dec 28 '11 21:12 ulitiy

Thank you for answer uliity.

dastanko avatar Dec 28 '11 21:12 dastanko

Is there an example to concect rails with sproutcore using the new version of bulk_api (without the mount route)?

filipechagas avatar Mar 12 '12 22:03 filipechagas

Seems we're supposed to run rails and sproutcore as two separate server instances now (e.g. rails w/ bulk_api running on port 3000, sproutcore on 4020). Don't forget to add

proxy '/api/bulk', :to => 'localhost:3000'

to your Sproutcore Buildfile or your XMLHttpRequests won't got through.

paceline avatar Mar 17 '12 00:03 paceline

Why don't you like mount route? It's the correct way to attach sc to the current process. You can do it manually. Why do you want to start another (eating your RAM and CPU) and proxy to it?

ulitiy avatar Mar 17 '12 18:03 ulitiy

Actually, I'd much rather use mount route but couldn't quite get it to work, which is why I started using two server instances. Can you point me in the right direction? Thanks!

paceline avatar Mar 19 '12 11:03 paceline

Try using https://github.com/drogus/bulk_api/tree/sc1 branch and https://github.com/drogus/bulk_api/blob/sc1/lib/generators/bulk/install/install_generator.rb here you can see the correct mount for the sc1 app.

ulitiy avatar Mar 19 '12 20:03 ulitiy