Greetings! I am working on a small RoR project and decided to split the front-end and the admin portion into two separate RoR projects. The project is a typical e-commerce website and as such has a folder to keep the images and thumbnail of the products. I am currently keeping this folder under public/product_images. This works fine with the front-end part, but is not accessible by admin project. I have two questions: 1. Is there a easy way to share a folder between two or more RoR projects 2. How this affects deployment Your help will be greatly appreciated. Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 2/28/08, Winter Mute <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I am working on a small RoR project and decided to split the front-end > and the admin portion into two separate RoR projects.Why, you enjoy pain or something? That''s breaking DRY to the second power. -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Donald wrote:> Why, you enjoy pain or something? That''s breaking DRY to the second > power.I have my reasons, the major one being I want to have 2 domains or a domain/subdomain, one regular and one SSL protected: http://www.mystore.com and https://admin.mystore.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 28 Feb 2008, at 21:13, Winter Mute wrote:> > Greg Donald wrote: >> Why, you enjoy pain or something? That''s breaking DRY to the second >> power. > > I have my reasons, the major one being I want to have 2 domains or a > domain/subdomain, one regular and one SSL protected: > > http://www.mystore.com and https://admin.mystore.comYou don''t need 2 apps to do that. Fred> > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
@Winter Mute As already pointed out you *can* accomplish this in one project. Check into the new namespacing options for routes.rb (www.yourdomain.com/admin/product and www.yourdomain.com/product) as one alternative. Another would be to use Rails'' ability to deliver the subdomain names to your controller and take the appropriate action. If you still must use two projects, you''d probably make the admin app''s public/product_images a symlink to the one for the main app. On Feb 28, 3:35 pm, Winter Mute <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Greetings! > > I am working on a small RoR project and decided to split the front-end > and the admin portion into two separate RoR projects. The project is a > typical e-commerce website and as such has a folder to keep the images > and thumbnail of the products. I am currently keeping this folder under > public/product_images. This works fine with the front-end part, but is > not accessible by admin project. I have two questions: > > 1. Is there a easy way to share a folder between two or more RoR > projects > 2. How this affects deployment > > Your help will be greatly appreciated. > > Thanks > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greetings - On 29-Feb-08, at 11:50 AM, AndyV wrote:> > @Winter Mute > > As already pointed out you *can* accomplish this in one project. > Check into the new namespacing options for routes.rb > (www.yourdomain.com/admin/product and www.yourdomain.com/product) as > one alternative. Another would be to use Rails'' ability to deliver > the subdomain names to your controller and take the appropriate > action. > > If you still must use two projects, you''d probably make the admin > app''s public/product_images a symlink to the one for the main app. > > On Feb 28, 3:35 pm, Winter Mute <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> Greetings! >> >> I am working on a small RoR project and decided to split the front- >> end >> and the admin portion into two separate RoR projects. The project >> is a >> typical e-commerce website and as such has a folder to keep the >> images >> and thumbnail of the products. I am currently keeping this folder >> under >> public/product_images. This works fine with the front-end part, but >> is >> not accessible by admin project. I have two questions: >> >> 1. Is there a easy way to share a folder between two or more RoR >> projects >> 2. How this affects deployment >> >> Your help will be greatly appreciated. >>I too am in favor of separate apps for the following reasons: 1. different UI (V) 2. different interactions (C) 3. same business logic (M) so how to do #3? create a plugin, and put your models into it. Then include it in both your app and the admin project. The added benefits are 2 fold - a reduction in the possibility of bugs (that can have grave consequences if your reg users gain some admin access), plus clearer separation for load and performance tuning. The database (unless you mirror) will be still be a common resource, but your mongrel/nginx/ etc can be tuned for end users. Additionally your deploys can be more liberal(frequent) with your admin users. Jodi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Fri, Feb 29, 2008 at 8:57 AM, Jodi Showers <jodi-BOB1p6JRLoAV+D8aMU/kSg@public.gmane.org> wrote:> > Greetings - > > > > On 29-Feb-08, at 11:50 AM, AndyV wrote: > > > > > @Winter Mute > > > > As already pointed out you *can* accomplish this in one project. > > Check into the new namespacing options for routes.rb > > (www.yourdomain.com/admin/product and www.yourdomain.com/product) as > > one alternative. Another would be to use Rails'' ability to deliver > > the subdomain names to your controller and take the appropriate > > action. > > > > If you still must use two projects, you''d probably make the admin > > app''s public/product_images a symlink to the one for the main app. > > > > On Feb 28, 3:35 pm, Winter Mute <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > >> Greetings! > >> > >> I am working on a small RoR project and decided to split the front- > >> end > >> and the admin portion into two separate RoR projects. The project > >> is a > >> typical e-commerce website and as such has a folder to keep the > >> images > >> and thumbnail of the products. I am currently keeping this folder > >> under > >> public/product_images. This works fine with the front-end part, but > >> is > >> not accessible by admin project. I have two questions: > >> > >> 1. Is there a easy way to share a folder between two or more RoR > >> projects > >> 2. How this affects deployment > >> > >> Your help will be greatly appreciated. > >> > > I too am in favor of separate apps for the following reasons: > > 1. different UI (V) > 2. different interactions (C) > 3. same business logic (M) > > so how to do #3? > > create a plugin, and put your models into it. Then include it in both > your app and the admin project. > > The added benefits are 2 fold - a reduction in the possibility of bugs > (that can have grave consequences if your reg users gain some admin > access), plus clearer separation for load and performance tuning. The > database (unless you mirror) will be still be a common resource, but > your mongrel/nginx/ etc can be tuned for end users. Additionally your > deploys can be more liberal(frequent) with your admin users. > > JodiWe use symlinks for app/models, app/layouts, with some shared helper, lib, javascript, and stylesheet paths too. It works fine. We just have to remember to do all db migrations on the admin app. It''s a mixed bag of pros/cons, really. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---