bulk_api
bulk_api copied to clipboard
Bulk install doesn't generate 'mount' route
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.
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"'
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.
Thank you for answer uliity.
Is there an example to concect rails with sproutcore using the new version of bulk_api (without the mount route)?
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.
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?
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!
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.