drogus / bulk_api

MIT License
149 stars 7 forks source link

Bulk install doesn't generate 'mount' route #21

Open trivektor opened 12 years ago

trivektor commented 12 years ago

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.

dastanko commented 12 years ago

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"'

ulitiy commented 12 years ago

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.

dastanko commented 12 years ago

Thank you for answer uliity.

filipechagas commented 12 years ago

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

paceline commented 12 years ago

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.

ulitiy commented 12 years ago

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?

paceline commented 12 years ago

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!

ulitiy commented 12 years ago

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.