[Rails] Re: Re: Re: Re: help with session

2012-04-22 Thread Paul Na
> > I presume you are using form_for to generate the form. It takes a > :url option which you can use to specify a named route. Have a look > at the docs for form_for. When you are trying to get it to work look > at the html of the page to check it is right. (View > Page Source or > similar in

[Rails] Re: Re: Re: help with session

2012-04-21 Thread Paul Na
>> >> Tests::Application.routes.draw do >> >> resources :tests > > Precisely. Look at the Rails Guide to see what that means. > Right ok i have got the new action defined with: resources :tests do post 'save', :on => :collection end which defines as /tests/save => tests#save then i rake

[Rails] Re: Re: help with session

2012-04-21 Thread Paul Na
Colin Law wrote in post #1057707: > On 21 April 2012 12:52, Paul Na wrote: >> < new one >> preview just retrieves the session values and links to edit, continue >> then the last one gives a page to submit the session values to the db >> with tests#cr

[Rails] Re: help with session

2012-04-21 Thread Paul Na
Hi Colin, Sorry i understand bits but I'm still new at rails. I see the form action is /tests and the form POSTs i.e. tests GET/tests(.:format) tests#index POST /tests(.:format) tests#create < this one POST /t

[Rails] help with session

2012-04-21 Thread Paul Na
Hi all, I have a app with the /tests/new location which renders the add new form. This all works perfectly so when i fill the form in it goes straight into the db but i want the form to store the data in session[:whateverfield] i.e. session[:id], session[:title], session[:name], etc Then pass t

[Rails] Re: Storing data temporary?

2012-04-20 Thread Paul Na
Colin Law wrote in post #1057623: > On 20 April 2012 19:53, Paul Na wrote: >> to true else delete from db) >> >> As anyone got any other suggestions on how this could be done. > > You could save the data in the session. This is the technique often > used for shoppin

[Rails] Storing data temporary?

2012-04-20 Thread Paul Na
Hi all, This is just a query about what is the best way to store data temporary without submitting it to a db. The reason for this it because i have create app that take input data via a form and after i would like to preview the data entered before putting it into the db. The only idea i have had

[Rails] Re: URL link and routes issue

2012-04-20 Thread Paul Na
Don't worry i sorted it -- 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@googlegroups.com. To unsubscribe from this group, send email to rub

[Rails] Re: URL link and routes issue

2012-04-20 Thread Paul Na
Sorry the second problem i sorted. I noticed that it is priority bases so i put the matches above the resources: tests and it worked!. So the only issue is the first one now. Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Goog

[Rails] URL link and routes issue

2012-04-20 Thread Paul Na
HI all, I have two problem so i thought i would put them together. First problem is that i can not what out how to get <%= link_to 'Show', test %> into a for the post i have selected. I have got to the point where i have got <%= test %> would just displays # in the address bar instead of i.e /te

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
I have sorted it, it was due to the application.css not being compiled Thanks for your help -- 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-tal

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
how comes it works in the development as its the same app? -- 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@googlegroups.com. To unsubscribe

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
Oh ok, so are there other option need to be set for the production env to stop the "We're sorry, but something went wrong." message -- 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 th

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
OK problem has been fixed by setting RailsEnv to development and it works, but setting it to production message comes back so it looks like passenger run it default in production mode so i don't know why this is. -- Posted via http://www.ruby-forum.com/. -- You received this message because y

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
The apache access log says : [07/Apr/2012:22:04:38 +0400] "GET /front/home HTTP/1.1" 500 643 ; when the message show [07/Apr/2012:22:04:38 +0400] "GET /front/home HTTP/1.1" 500 - ; when the message don't show due to changing the permission. -- Posted via http://www.ruby-forum.com/. -- You r

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
here is the passenger log and the error is shown as access front/home: [ pid=2235 thr=140125444347872 file=ext/apache2/Hooks.cpp:1378 time=2012-04-07 21:48:23.774 ]: Initializing Phusion Passenger... [ pid=2235 thr=140125444347872 file=ext/apache2/Hooks.cpp:1653 time=2012-04-07 21:48:23.822 ]: S

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
Right i have changed the permission off the whole app folder to apache:apache and the message has gone but has not render the html.erb file :S -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. T

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
Its works fine with webrick but not passenger/apache -- 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@googlegroups.com. To unsubscribe from t

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
Hi colin, Theres no log/development.log ? and i can't find the log anywhere, i even tried the apache log but nothing in there either :( 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.

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
Sorry i didn't load the passenger module it wooops, but now i'm getting a message: We're sorry, but something went wrong. -- 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

[Rails] Re: problem with controllers

2012-04-07 Thread Paul Na
I am use REE too if thats helps, as when starting webrick i get can't connect to mysql so its bit more than the other with is on like i said REE and apache 2. Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] problem with controllers

2012-04-07 Thread Paul Na
Hi all, I have setup a ROR environment on my server and once i generate a controller with a few actions in it and put a basic message in each action within the controller rb file also editing the views for these actions all i get is the standard 404 not found. I can not understand why this is. An

[Rails] Re: Re: Re: Re: Bit of a issue with creating a new app and running it

2012-02-27 Thread Paul Na
Peter Vandenabeele wrote in post #1049083: > On Mon, Feb 27, 2012 at 6:25 PM, Paul Na wrote: > >> Hi Peter, >> >> Its going to be both but once it's working when i have made the app in >> will go from development to production. >> > > I would not

[Rails] Re: Re: Re: Bit of a issue with creating a new app and running it

2012-02-27 Thread Paul Na
he same as development or production. test: host: localhost adapter: mysql2 encoding: utf8 database: testing usrename: root password: pool: 5 timeout: 5000 production: host: localhost adapter: mysql2 encoding: utf8 database: production username: root password: pool: 5 timeo

[Rails] Re: Re: Bit of a issue with creating a new app and running it

2012-02-27 Thread Paul Na
Oh ok thanks. I am using mysql server 5 and trying db:create runs but don't create the db's plus when opening up port 3000 on the browser it says "ActiveRecord::ConnectionNotEstablished" Paul Colin Law wrote in post #1049071: > On 27 February 2012 16:22, Paul

[Rails] Re: Bit of a issue with creating a new app and running it

2012-02-27 Thread Paul Na
Sorry, I just used and installed execjs and therubyracer and its working now. 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@goog

[Rails] Re: Bit of a issue with creating a new app and running it

2012-02-27 Thread Paul Na
Hi colin, Thanks the modified the Gemfile and did the bundle install and now its saying that it can not find the javascript runtime? p.s does it have to be mysql2 or 3, as i have just put mysql? Thanks Colin Law wrote in post #1049063: > On 27 February 2012 15:49, Paul Na wrote: >&g

[Rails] Bit of a issue with creating a new app and running it

2012-02-27 Thread Paul Na
HI all, I have just setup the ROR environment on a vps, but once i created the app and run rails s or db:create after modifying the database.yml it keeps on appearing with the "Could not find gem sqlite3" etc message which i know this as it's not install as i am using mysql. What else have i got t

[Rails] Re: Query on db with mysql

2012-02-27 Thread Paul Na
Hi, Sorry for the late reply i have been busy. I have got a vps now but Jeffrey you are right i totally forgot that but its to late now as i have cancelled the account. Thanks anyway Paul -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Query on db with mysql

2012-02-25 Thread Paul Na
Hi all, I have a host that allows ssh access but only on the main account. I was just wondering can you setup the db without using the command line e.g db:migrate generate etc as on my main account its fine but if i setup other sites i will have to pay $10/£6 to activate ssh. Thanks -- Posted

[Rails] question about running ror apps

2009-04-25 Thread Paul Na
hi all, i have got my laptop for making apps in ror but im just wondering when i setup my server to run it do i install ruby irb gems, or do i just install ruby as this will be only to run it. ps. what others bits do it need to install for mysql to work with ruby etc. thanks -- Posted via ht

[Rails] Re: how to use templates in ruby

2009-03-04 Thread Paul Na
Robert Walker wrote: > Paul Na wrote: >> Thanks its working , Im just trying to get my head around it all. > > By the way in case you didn't notice, all the cool kids are using the > "html.erb" extension instead of "rhtml" extension for view templa

[Rails] Re: how to use templates in ruby

2009-03-04 Thread Paul Na
Peter Vandenabeele wrote: > On Wed, Mar 4, 2009 at 11:01 AM, Peter Vandenabeele > wrote: >> If I understand correctly, the fact that you call render explicitely >> in the controller, will avoid the "automatic" render of the template in >> app/views/articles/index.html.erb > > Forgot to explain t

[Rails] how to use templates in ruby

2009-03-03 Thread Paul Na
hi all, I have created links ie:- /articles /news and i looked on a site and it said creating a .rhtml file in the app/views/articles news etc but when i created news.rhtml and articles.rhtml and put it in the folder in the app/views and its still reading the class ArticlesController < Applica

[Rails] Re: how to set a page of root/ dir of a site

2009-03-02 Thread Paul Na
Peter Vandenabeele wrote: > On Mon, Mar 2, 2009 at 11:28 PM, Paul Na > wrote: >> the welcome to ruby page > I see 2 steps: > > 1) move the /public/index.html file to another name (e.g. $mv > index.html index.html.ORIG) > > 2) add a route for '/'

[Rails] how to set a page of root/ dir of a site

2009-03-02 Thread Paul Na
Hi all, I have started making a site in ruby/rails and just wondering how to set the page for the root/ dir of the site as i have got the other pages done ie:- example/dir1 example/dir2 example/dir3 example/dir4 but just wondering how to set the example/ page as it always appears as the welcom