[Rails] Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 20, 12:55 pm, Walter Lee Davis wa...@wdstudio.com wrote: On Apr 20, 2011, at 12:31 PM, amrit pal pathak wrote: Here you go. Amazing what you find on the Internet these days. http://tinyurl.com/3bp7nsh It tells to run the app on different ports,but i want to run it without giving any port like at example.com That's an implementation detail. All of the (non-secure) Web sites you visit that don't show a port use the *default* port 80. If you want to be completely pedantic, the URL for the Apple home page ishttp://www.apple.com:80/index.html. But when you type inwww.apple.com , your browser first takes the leap of faith that you mean http:// (since it is a browser, after all) and then further assumes that you mean port 80, because you didn't top your URL with https:// or tail the domain with :443. Then, because you didn't enter a filename, the Apache server (or whatever they use there) looks up the DefaultIndex and fills that in for you, and performs a silent redirect (it doesn't tell you the exact details, so it could just as easily be index.php or index.erb or anything at all) to whatever that actual index file is, and THEN starts filling the sub-requests contained in that index file. You can read a lot more about this at the Apache site, in the httpd project documentation. Pick the version you use there, and read up on mod_rewrite and its cousins. Short answer, you can do this, it's done every day, and it's not that difficult. Slightly longer answer, you still haven't given any good reason why you would want to do this in the development environment. But have you looked athttp://pow.cx/for no-config local network hosting with a real domain? Pow is just for Mac .I am running ubuntu 10.04,so unable to install and config it . Any solution?alternative? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 20, 8:51 am, Bryan Crossland bacrossl...@gmail.com wrote: On Tue, Apr 19, 2011 at 10:57 AM, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 19, 4:09 am, Alexander cutal...@gmail.com wrote: Open your /etc/hosts file in Linux. Windows is the same hosts file under some other directory. Any how puts the next line in the file 127.0.0.1 example.com Then if you ping example.com IP 127.0.0.1 will respond. now you can use example.com:3000 to access your web site. Thanks .It helped me. If you are not happy with your 3000 port then change Rails default http port setting. I don't know how to change this port number. It's possible with iptables. Try out these rules: sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.0/8 -j REDIRECT --to-port 3000 sudo iptables -t nat -A OUTPUT -p tcp --dport 8080 -d 127.0.0.0/8 -j REDIRECT --to-port 80 First rule will redirect all local traffic from 80 to 3000. The second will redirect 8080 to 80, to allow you access phpmyadmin or whatever you have on 80 port. Tested on Ubuntu. Both exectued sussfully.Now can i access,rails application without port number 3000? If yes,what to do next? Here you go. Amazing what you find on the Internet these days. http://tinyurl.com/3bp7nsh It tells to run the app on different ports,but i want to run it without giving any port like at example.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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: rake db:create fails
Have you mention the database name in dabase.yml file? Regards Amrit pal -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How to enable production enviornment in RoR 2.3.5
On Apr 20, 1:01 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Wed, Apr 20, 2011 at 11:21 AM, amritpal pathak amritpalpath...@gmail.com wrote: I want to enable production enviornment for my appication.The content of database.yml file is as # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: mysql database: amritpal username: root password: 12345 pool: 5 timeout: 5000 # Warning: The database defined as test will be erased and # re-generated from your development database when you run rake. # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: mysql database: production username: root password: 12345 pool: 5 timeout: 5000 I ran RAILS_ENV=production rake db:create ,it created a production database.Here is assume that the production enviornment is enable(But i was wrong).Then i created a simple scaffold as. script/generate scaffold person firstname:string lastname:string; rake db:migrate(it created a table namedpeople in amritpal database that is used in development envionrment.But in production enviornment ,the database production hasn't any talbe) How to enable it? Thanks I believe Colin already discussed with with you in another thread. As I have tried to explain several times the value of RAILS_ENV determines which environment will be used when you execute a rake command. The environment defaults to development. So: rake db:migrate will migrate the development db. RAILS_ENV=production rake db:migrate will migrate the production db. Colin If you are looking to be always running in production mode and never in any other mode then my advice would be the set the environment variable RAILS_ENV on your system to production. RAILS_ENV=production You can look up how to do that for your OS anywhere on the internet. At other thread ,i followed collin instrutions but at last i strucked a error to which i didnt receive a reply yet.So i post a new thread.Please look at that thread and see if you can help http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d911b888dbd30c58 Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 19, 4:09 am, Alexander cutal...@gmail.com wrote: Open your /etc/hosts file in Linux. Windows is the same hosts file under some other directory. Any how puts the next line in the file 127.0.0.1 example.com Then if you ping example.com IP 127.0.0.1 will respond. now you can use example.com:3000 to access your web site. Thanks .It helped me. If you are not happy with your 3000 port then change Rails default http port setting. I don't know how to change this port number. It's possible with iptables. Try out these rules: sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.0/8 -j REDIRECT --to-port 3000 sudo iptables -t nat -A OUTPUT -p tcp --dport 8080 -d 127.0.0.0/8 -j REDIRECT --to-port 80 First rule will redirect all local traffic from 80 to 3000. The second will redirect 8080 to 80, to allow you access phpmyadmin or whatever you have on 80 port. Tested on Ubuntu. Both exectued sussfully.Now can i access,rails application without port number 3000? If yes,what to do next? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 18, 1:14 pm, Colin Law clan...@googlemail.com wrote: On 18 April 2011 17:46, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 18, 12:30 pm, Colin Law clan...@googlemail.com wrote: On 18 April 2011 17:12, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 18, 9:07 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011 10:00, amrit pal pathak amritpalpath...@gmail.com wrote: ... it will be created as rake db:create (after specifying in the production enviornment i,e database: production)?? and to start the server in production mode. To create the production database RAILS_ENV=production rake db:migrate Please tell me in which to specity RAILS_ENV=production.I didnt find it in enviornment.rb file You just run the command RAILS_ENV=production rake db:create I ran RAILS_ENV=production and then rake db:create (sussessfully worked) It created the database with same name as my application name. is It all done? Is what all done? It created the db, what more do you expect rake db:create to do? I mean it is all i have done to enable production enviornment? There is no need to change the database.yml file's production environment settings? If you wanted any changes you should have made them before running db:create. It will have used the settings under production: from database.yml. The changed contents of database.yml file are # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: mysql database: amritpal username: root password: 12345 pool: 5 timeout: 5000 # Warning: The database defined as test will be erased and # re-generated from your development database when you run rake. # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: mysql database: production username: root password: 12345 pool: 5 timeout: 5000 Now again i ran RAILS_ENV=production rake db:create ,it created a production database.I hope now the prduction enviornment is enable? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
I think the production enviorment is still not enabled.because i when i tried script/generate scaffold person firstname:string lastname:string; rake db:migrate(it created a table namedpeople in amritpal database that is used in development envionrment.But in production enviornment ,the database production hasn't any talbe) Means still i working in development?? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 18, 11:48 am, Mohamed Aslam aslamnaj...@gmail.com wrote: All most all developers develop application in their local computer. This is called as development environment. Once your development completed, you need to move the application to a production server where other people can use your website. Moving the application from development environment to production servers called deployment. Hope you understand. Thanks i got : -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 17, 9:02 pm, Peter De Berdt peter.de.be...@pandora.be wrote: On 17 Apr 2011, at 17:04, amrit pal pathak wrote: On Apr 17, 7:27 am, Chris Kottom ch...@chriskottom.com wrote: Are you planning to continue using sqlite in the production environment? Most people don't, but it's not a problem to do so. If not or if the default sqlite settings aren't right for you, then you'll need to make some changes, but those will depend on the environment you're deploying into. But what those should be isn't a question the mailing list can answer for you without more information. The production environment setting with sqllite are by default .I want to use mysql for production too.So i changed the production enviornment settings to production: adapter: mysql database: blog username: root password: 12345 pool: 5 timeout: 5000 Is it enough?? If you're running Rails 3, you're better off using mysql2 as the adapter and you have to make sure you include the mysql2 gem in your Gemfile too. Also, you might want to use a more secure password for MySQL on your production server ;-) I am running rails 2.3.5.Now view following adapter: mysql database: blog username: root password: (will take a strong password ) pool: 5 timeout: 5000 socket: /var/run/mysqld/mysqld.sock Is it ok now? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 18, 3:56 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011 08:23, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 17, 9:02 pm, Peter De Berdt peter.de.be...@pandora.be wrote: On 17 Apr 2011, at 17:04, amrit pal pathak wrote: On Apr 17, 7:27 am, Chris Kottom ch...@chriskottom.com wrote: Are you planning to continue using sqlite in the production environment? Most people don't, but it's not a problem to do so. If not or if the default sqlite settings aren't right for you, then you'll need to make some changes, but those will depend on the environment you're deploying into. But what those should be isn't a question the mailing list can answer for you without more information. The production environment setting with sqllite are by default .I want to use mysql for production too.So i changed the production enviornment settings to production: adapter: mysql database: blog username: root password: 12345 pool: 5 timeout: 5000 Is it enough?? If you're running Rails 3, you're better off using mysql2 as the adapter and you have to make sure you include the mysql2 gem in your Gemfile too. Also, you might want to use a more secure password for MySQL on your production server ;-) I am running rails 2.3.5.Now view following adapter: mysql database: blog username: root password: (will take a strong password ) pool: 5 timeout: 5000 socket: /var/run/mysqld/mysqld.sock Is it ok now? Does it work? Don't forget to make the production database it will be created as rake db:create (after specifying in the production enviornment i,e database: production)?? and to start the server in production mode. how to start server in production mode? is it simply script/server?? or other are to be made in other files ?? I would advise against using your mysql root user for rails access, better to make a rails user and give it just the permissions it needs. Now i will use root for some time,afterwards i will change Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] How to change the url (from localhostL:3000) to (example.com)
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at example.com in brower when i start the serve normally as script/ server . What to do? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] How to change the url (from localhostL:3000) to (example.com)
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at example.com in brower when i start the serve normally as script/ server . What to do? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] How to generate a form in rails 2.3.5
I am new to ROR and running 2.3.5.I want a simple form with some text boxes,password field,check box etc. How to generate a form in ROR? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] How to generate a form in rails 2.3.5
I am new to ROR and running 2.3.5.I want a simple form with some text boxes,password field,check box etc. How to generate a form in ROR? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] How to change the url (from localhostL:3000) to (example.com)
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at example.com in brower when i start the serve normally as script/ server . What to do? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] whyt should i use mongrel_cluster ?
why should i use mongrel_cluster in my rails application? What are its benefits for which i should install and configure it ? is webrick server not enough for rails application? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] whyt should i use mongrel_cluster ?
why should i use mongrel_cluster in my rails application? What are its benefits for which i should install and configure it ? is webrick server not enough for rails application? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How to generate a form in rails 2.3.5
On Apr 18, 6:05 am, Chris Kottom ch...@chriskottom.com wrote: Have you readhttp://guides.rubyonrails.org/v2.3.8/form_helpers.html? i read a bit .like it tell about to write a simple code like form action=/home/index method=post div style=margin:0;padding:0 input name=authenticity_token type=hidden value=f755bb0ed134b76c432144748a6d4b7a7ddf2b71 / /div Form contents /form But i didnt explain in which file it should be written? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 18, 11:41 am, dana tassler dana.tass...@gmail.com wrote: As always, Colin has at least one good point. And I would add to that. Initially, you asked what is meant by deployment. Several people did provide the answer to that question, at which point this topic could safely have been considered closed. I too think so.Sorry for extending the question. -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 18, 9:07 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011 10:00, amrit pal pathak amritpalpath...@gmail.com wrote: ... it will be created as rake db:create (after specifying in the production enviornment i,e database: production)?? and to start the server in production mode. To create the production database RAILS_ENV=production rake db:migrate Please tell me in which to specity RAILS_ENV=production.I didnt find it in enviornment.rb file Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 18, 12:30 pm, Colin Law clan...@googlemail.com wrote: On 18 April 2011 17:12, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 18, 9:07 am, Colin Law clan...@googlemail.com wrote: On 18 April 2011 10:00, amrit pal pathak amritpalpath...@gmail.com wrote: ... it will be created as rake db:create (after specifying in the production enviornment i,e database: production)?? and to start the server in production mode. To create the production database RAILS_ENV=production rake db:migrate Please tell me in which to specity RAILS_ENV=production.I didnt find it in enviornment.rb file You just run the command RAILS_ENV=production rake db:create I ran RAILS_ENV=production and then rake db:create (sussessfully worked) It created the database with same name as my application name. is It all done? There is no need to change the database.yml file's production environment settings? Thanks As I pointed out previously did you try googling for rails create production database before asking here? I tried but it didn't help.Thats why i moved here -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 16, 11:40 am, Colin Law clan...@googlemail.com wrote: On 16 April 2011 16:32, amritpal pathak amritpalpath...@gmail.com wrote: what is meaning of deploy a ruby on rails application?i am new to RoR. please somebody explain it Deployment is the process of putting the application on a production server for use by real users. Means enabling the production server from the database.yml file -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] No route matches /home/index with {:method=:get}
I followed a tutorial to learn ruby on rails at http://guides.rubyonrails.org/v2.3.8/getting_started.html After creating a view and controller as script/generate controller home index and then i changed the contents of app/view/home/ index.html.erb file according to tutorial into one line as h1Hello, Rails!/h1 Now i started the server as script/ server(successfully started) and when i navigate to localhost:3000/ home/index, i got a error message which says ROUTING ERROR No route matches /home/index with {:method=:get} Please someone help to resolve. Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] No route matches /home/index with {:method=:get}
I followed a tutorial to learn ruby on rails at http://guides.rubyonrails.org/v2.3.8/getting_started.html After creating a view and controller as script/generate controller home index and then i changed the contents of app/view/home/ index.html.erb file according to tutorial into one line as h1Hello, Rails!/h1 Now i started the server as script/ server(successfully started) and when i navigate to localhost:3000/ home/index, i got a error message which says ROUTING ERROR No route matches /home/index with {:method=:get} Please someone help to resolve. Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 17, 2:08 am, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 16, 11:40 am, Colin Law clan...@googlemail.com wrote: On 16 April 2011 16:32, amritpal pathak amritpalpath...@gmail.com wrote: what is meaning of deploy a ruby on rails application?i am new to RoR. please somebody explain it Deployment is the process of putting the application on a production server for use by real users. Means enabling the production server from the database.yml file?? -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: No route matches /home/index with {:method=:get}
On Apr 17, 2:59 am, Jatin kumar jatinkumar.n...@gmail.com wrote: On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak amritpalpath...@gmail.com wrote: I followed a tutorial to learn ruby on rails at http://guides.rubyonrails.org/v2.3.8/getting_started.html After creating a view and controller as script/generate controller home index and then i changed the contents of app/view/home/ index.html.erb file according to tutorial into one line as h1Hello, Rails!/h1 Now i started the server as script/ server(successfully started) and when i navigate to localhost:3000/ home/index, i got a error message which says ROUTING ERROR No route matches /home/index with {:method=:get} Remove the /public/index.html file in your app directory. Check to see if you have a route for root in your routes.rb file. If not, make it *map.root :controller = home* If you still have problems, post the contents of your routes file. I added the *map.root :controller = home* at the bottom of router.rb file and it worked.so i could accessed now localhost:3000/ home/index Please explain how it (*map.root :controller = home*) is working (means which part calls to which). Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: No route matches /home/index with {:method=:get}
On Apr 17, 4:01 am, Chris Kottom ch...@chriskottom.com wrote: Also verify that you are _actually_ using Rails 2.3.8. Very basic check, I know, but routing syntax is different in Rails 3, and I don't believe older syntax is supported. I am running rails 2.3.5 and this format worked for me. Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 17, 4:06 am, Chris Kottom ch...@chriskottom.com wrote: In a strict operational sense, the term means installation and configuration/activation of software on any environment under management, so it could be meant as production, staging, integration testing, etc. In the Rails world where development and testing are most often virtual environments coexisting on the developer's workstation, this will only be the production environment for most cases. I am running the application in development enviornment.I want to run it under now production one.So what changes i have to make in database.yml file The content of this file as are # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: mysql database: amritpal username: root password: 12345 pool: 5 timeout: 5000 # Warning: The database defined as test will be erased and # re-generated from your development database when you run rake. # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: what is mean of Deployment?
On Apr 17, 7:27 am, Chris Kottom ch...@chriskottom.com wrote: Are you planning to continue using sqlite in the production environment? Most people don't, but it's not a problem to do so. If not or if the default sqlite settings aren't right for you, then you'll need to make some changes, but those will depend on the environment you're deploying into. But what those should be isn't a question the mailing list can answer for you without more information. The production environment setting with sqllite are by default .I want to use mysql for production too.So i changed the production enviornment settings to production: adapter: mysql database: blog username: root password: 12345 pool: 5 timeout: 5000 Is it enough?? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: script/server (Error)
On Apr 12, 1:06 pm, Chris Kottom ch...@chriskottom.com wrote: Try: rake db:create Tried it ,but it didnt help.Same error still exist -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: script/server (Error)
On Apr 14, 2:46 am, Chris Kottom ch...@chriskottom.com wrote: Check your database.yml file. In many cases, the problem can be due to indentation, trailing whitespace, etc. The content of database.yml file are as # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter:mysql database:blogg username:root password:12345 socket:/var/run/mysqld/mysqld.sock # Warning: The database defined as test will be erased and # re-generated from your development database when you run rake. # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 in development environment ,seems no whitespaces.So what may be behind the error? Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: rake db:create (Gives the error)
On Apr 12, 8:00 am, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 12, 12:46 pm, amritpal pathak amritpalpath...@gmail.com wrote: i tried to generate a database .The config/database.yml file hold following for the development environment adapter: mysql database: blogg username: root password: 12345 socket: /var/run/mysqld/mysqld.sock Yaml is quite fussy about its indentation - make sure you're using spaces rather than tabs and everything is indented consistently Thank you very much.it helped why i didn't get the reply by the mail.i have joined this malilng list already? Fred rails -v=2.3.8 gem -v= 1.3.7 ruby -v=ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] When i tried cd blog rake db:create it gave me following error (in /home/amrit/blog) rake aborted! syntax error on line 4, col 11: ` database: blogg' (See full trace by running task with --trace) Please help to resolve it. Thanks -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Fedena installation: Error
am getting error: rake db:migrate (in /home/hsrai/public_html/ERP/ERP_Campus/projectfedena_v2.0) rake aborted! can't activate , already activated prawn-0.11.1 Where is problem? Fedena is Ruby on Rails (RoR) application. My installation log is below signature. mkdir ERP cd ERP wget http://202.164.53.122/ERP/ERP_Campus.tar.gz tar -zxvf ERP_Campus.tar.gz cd ERP_Campus/projectfedena_v2.0/ sudo apt-get install rake ruby1.8-dev rake gems:install sudo gem install rails -v=2.3.5 --remote sudo rake gems:install sudo gems install prawn joe config/database.yml sudo gem install mysql --remote rake db:create rake db:migrate ruby script/server -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.