My home address is something like www.hosting.com/~myid/ I uploaded my rails blog app in the blog folder, www.hosting.com/~myid/blog/ and I ran ''rails server'' to launch server. (in default, it will use port 3000) When I connect to the www.hosting.com:3000/~myid/blog/ It shows the routing error - No route matches "/~myid/blog" It seems that rails application is accepting /~myid/blog as controller&action. I assume /~myid/blog/ will be the base address for every routing that will come to this address. How can I resolve this problem??? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 January 2011 16:36, cielo <c.holic01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> My home address is something like > > www.hosting.com/~myid/ > > I uploaded my rails blog app in the blog folder, > > www.hosting.com/~myid/blog/ > > and I ran ''rails server'' to launch server. (in default, it will use > port 3000) > > When I connect to the www.hosting.com:3000/~myid/blog/ It shows the > routing error - No route matches "/~myid/blog"Try just www.hosting.com:3000/ Colin> > It seems that rails application is accepting /~myid/blog as > controller&action. > > I assume /~myid/blog/ will be the base address for every routing that > will come to this address. > > How can I resolve this problem??? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
cielo wrote in post #973129:> I assume /~myid/blog/ will be the base address for every routing that > will come to this address. > > How can I resolve this problem???You''re web server''s virtual host should set /~myid/blog/public as the site''s DocumentRoot. You should be able to set this up in the .htaccess file that your shared hosting company provides for you. Typically Apache or Nginx is used as a front-end web server for Rails applications and something like Phusion Passenger to take care of the interaction between the web server and the Rails application. Typically the web servers provided by rails server are not really suitable for production level deployment on their own. Generally speaking static assets are delivered by the front-end web server (Apache or Nginx). Example: <VirtualHost *:80> ServerName www.example.com ServerAlias example.com DocumentRoot /var/rails/my_app/public </VirtualHost> -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.