Re: [Rails] Can't get debugger to work on MacOS X Lion/Rails 3.2/Ruby 1.9.3

2012-04-07 Thread Jonan Scheffler
I've been having similar issues. There is apparently a fork of the project called simply 'debugger' as the original ruby-debug seems to have been abandoned (heresay). Let me know if you find a solution; debugger didn't work for me, but it is likely that my system is borked uniquely as most I know

[Rails] Re: Agile Web Development 4th ed. - Can't mass assign.error

2012-04-07 Thread Lucas J.
Thanks, Jeffrey. I just wanted to ensure that I was on the right track and that I wasn't setting myself up for more problems later. Tom - I tried google first (I always do). My attributes are already set to attr_accessible in my models (there are only three at this point), which is why I was

[Rails] Can't get debugger to work on MacOS X Lion/Rails 3.2/Ruby 1.9.3

2012-04-07 Thread David Paschich
I'm trying to get the ruby debugger working and can't seem to get there. Environment summary: Mac OS X Lion RVM Ruby 1.9.3p125 Rails 3.2.3 Rspec 2.9.0 I've put the debugger statement in my controller like so: def show debugger seasons = Season.where(:name=>params[:id]) puts @seas

Re: [Rails] Agile Web Development 4th ed. - Can't mass assign.error

2012-04-07 Thread Tom Meinlschmidt
On Apr 8, 2012, at 1:14 , Lucas J. wrote: > I am new to Ruby and to Rails (using Ruby 1.9.3 and Rails 3.2.3) so I > picked up the Agile Web Development book and have been working through > it (apologies if this isn't the correct place for this question but the > pragprog forums don't seem to work

Re: [Rails] Agile Web Development 4th ed. - Can't mass assign.error

2012-04-07 Thread Jeffrey L. Taylor
Quoting Lucas J. : > I am new to Ruby and to Rails (using Ruby 1.9.3 and Rails 3.2.3) so I > picked up the Agile Web Development book and have been working through > it (apologies if this isn't the correct place for this question but the > pragprog forums don't seem to work for me). I am currently

Re: [Rails] Re: Rails & PHP

2012-04-07 Thread Ralph Shnelvar
Title: Re: [Rails] Re: Rails & PHP Matt, Saturday, April 7, 2012, 1:43:46 PM, you wrote: On Friday, 6 April 2012 15:53:13 UTC-4, RalphShnelvar wrote: I am inheriting a legacy PHP website and I want to add a few Rails pages. Is there anyone who can recommend some info on how to add RoR

[Rails] Agile Web Development 4th ed. - Can't mass assign.error

2012-04-07 Thread Lucas J.
I am new to Ruby and to Rails (using Ruby 1.9.3 and Rails 3.2.3) so I picked up the Agile Web Development book and have been working through it (apologies if this isn't the correct place for this question but the pragprog forums don't seem to work for me). I am currently working through the book a

[Rails] Re: AJAX form (using simple_form) with preserved error validation

2012-04-07 Thread Abram
Someone provided an answer. FYI I think you can simplify this by putting your form in a partial (we'll call it simple_form), and putting this code in reload.js.erb: $("#entryform").html("<%= escape_javascript(render :partial => 'simple_form') %>"); I'm not familiar with jQuery's load method, but

[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: Re: Ajax Pagination, repeating

2012-04-07 Thread sherpa derpa
Thank you for your help Colin. I think I know what I need to do. Colin Law wrote in post #1055448: > On 7 April 2012 21:49, sherpa derpa wrote: >> The code >> >> <%= div_for holiday do %> > > Apart from the fact that there is no loop in the code, is it legal > html to have td tags inside a div?

Re: [Rails] Re: Ajax Pagination, repeating

2012-04-07 Thread Colin Law
On 7 April 2012 21:49, sherpa derpa wrote: > The code > > <%= div_for holiday do %> Apart from the fact that there is no loop in the code, is it legal html to have td tags inside a div? Even if it is I can't think of any good reason for it. Colin -- You received this message because you are s

[Rails] Re: Ajax Pagination, repeating

2012-04-07 Thread sherpa derpa
The code <%= div_for holiday do %> What i have is each individual record now having the column headings above the record, when it should be on top of every page just once? Colin Law wrote in post #1055437: > On 7 April 2012 20:47, Colin Law wrote: >>> >>> >>> <% div_for for holidays in @ho

Re: [Rails] Re: Ajax Pagination, repeating

2012-04-07 Thread Colin Law
On 7 April 2012 21:38, sherpa derpa wrote: > Apologies. > > You're code has worked. 12 Records now show up. However the column > headings appear above each record, instead of just at the top. Once again you have not quoted the previous reply so we don't know which message you are referring to. >

[Rails] Re: Ajax Pagination, repeating

2012-04-07 Thread sherpa derpa
Apologies. You're code has worked. 12 Records now show up. However the column headings appear above each record, instead of just at the top. Username Date Leaving Date Submitted Approved Date Updated <% div_for holiday do %> <%= link_to holiday.user.username, holiday %> <%= holiday.dateleavi

Re: [Rails] Re: problem with controllers

2012-04-07 Thread Colin Law
On 7 April 2012 21:33, Paul Na wrote: > how comes it works in the development as its the same app? Look in production.log and you may find out. There is no way anyone here can know the answer. There are innumerable possibilities from forgetting to create the production database to subtle page c

[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

Re: [Rails] Re: Ajax Pagination, repeating

2012-04-07 Thread Colin Law
On 7 April 2012 21:25, sherpa derpa wrote: > Right that's worked, however it now puts the column headings above each > record? What has worked? Since you have not quoted any previous reply no-one knows what you are referring to. First work out what html you want then write to code to generate t

[Rails] Re: Ajax Pagination, repeating

2012-04-07 Thread sherpa derpa
Right that's worked, however it now puts the column headings above each record? -- 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

Re: [Rails] problem with controllers

2012-04-07 Thread Tom Meinlschmidt
On Apr 7, 2012, at 21:34 , Paul Na wrote: > 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 "We're sorry, but something went wrong." message says there's something wrong in your code/setup. You have to check

[Rails] Re: Ajax Pagination, repeating

2012-04-07 Thread sherpa derpa
Changed that, still doesn't work. Will have a look at the debugger. Thank you Colin Law wrote in post #1055435: > On 7 April 2012 20:07, Antony Shimmin wrote: >> I render a partial as follows. >> <% div_for for holidays in @holidays%> > That should be "for holiday in" not "for holidays in" > >

Re: [Rails] Ajax Pagination, repeating

2012-04-07 Thread Colin Law
On 7 April 2012 20:47, Colin Law wrote: > On 7 April 2012 20:07, Antony Shimmin wrote: >> Hi there, >> >> I have Ajax Pagination (sort of) working on my Ruby on Rails Project. >> >> However my problem is, is that it repeats each page x number of times, x >> being equal to the amount of records I

Re: [Rails] Ajax Pagination, repeating

2012-04-07 Thread Colin Law
On 7 April 2012 20:07, Antony Shimmin wrote: > Hi there, > > I have Ajax Pagination (sort of) working on my Ruby on Rails Project. > > However my problem is, is that it repeats each page x number of times, x > being equal to the amount of records I have on each page. > > So lets say for example pr

[Rails] Re: Rails & PHP

2012-04-07 Thread Matt Jones
On Friday, 6 April 2012 15:53:13 UTC-4, RalphShnelvar wrote: > > I am inheriting a legacy PHP website and I want to add a few Rails pages. > > Is there anyone who can recommend some info on how to add RoR to a > PHP-driven website? > > Ralph Shnelvar > Depends on what you mean by "PHP-driven" -

[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

Re: [Rails] Re: problem with controllers

2012-04-07 Thread Tom Meinlschmidt
passenger _always_ runs in production mode if not specified else ServerName example.com DocumentRoot /app/public RailsEnv development tom On Apr 7, 2012, at 21:24 , Paul Na wrote: > OK problem has been fixed by setting RailsEnv to development and it > works, but setting it to production mess

[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] Ajax Pagination, repeating

2012-04-07 Thread Antony Shimmin
Hi there, I have Ajax Pagination (sort of) working on my Ruby on Rails Project. However my problem is, is that it repeats each page x number of times, x being equal to the amount of records I have on each page. So lets say for example prior to the Ajax Pagination, I had 12 records per page, now

[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.

Re: [Rails] Re: problem with controllers

2012-04-07 Thread Colin Law
On 7 April 2012 17:25, Paul Na wrote: > Sorry i didn't load the passenger module it  wooops, but now i'm getting > a message: > > We're sorry, but something went wrong. Look in log/development.log or/and in the server terminal window, there should be more info there. Colin -- You received this

[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

Re: [Rails] Re: problem with controllers

2012-04-07 Thread Colin Law
On 7 April 2012 16:52, Paul Na wrote: > 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. Post the full error message. We are not telepathic. At least I am not. Copy and paste it, d

[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

Re: [Rails] problem with controllers

2012-04-07 Thread Walter Lee Davis
On Apr 7, 2012, at 11:36 AM, Paul Na wrote: > 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 sta

[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

Re: Re: [Rails] Upgrading to Rails 3

2012-04-07 Thread Jodi Showers
I suggest you get your tests in gear if not already get a core group (start with models, then controllers, minimum of models) passing in 2.3.5 then upgrade you'll find a great number of plugins and gems will need to be upgraded - and some will have to be hand patched if you cannot find a suita

[Rails] Re: Getting error when using Devise and Twitter-Bootstrap

2012-04-07 Thread Karthikeyan A k
I precompiled assets as told in heroku and it worked. -- 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

[Rails] Re: sqlite3-ruby is invalid?

2012-04-07 Thread Luis Lavena
On Friday, April 6, 2012 4:37:17 PM UTC-3, Jeff Kyzer wrote: > > Hello > I have been learning ruby on rails 3 from the Michael hartl book, and > I have run into something that I can't figure out. After updating the > gem file and running bundle install, I am getting the following error > > You

[Rails] Re: New service to improve i18n management

2012-04-07 Thread YogiZoli
Excellent idea, just signed up! On Apr 6, 12:31 pm, comopasta Gr wrote: > Manuel Boy wrote in post #1055240: > > > Hi everyone! > > > we have been working on phrase , a project around > > the i18n gem. It provides the ability to translate a website using > > in-place > > ed

Re: [Rails] Re: Upgrading to Rails 3

2012-04-07 Thread Jeffrey L. Taylor
Quoting Gurdipe Dosanjh : > Hi All, > > Re: Upgrading to Rails 3 > > I am working on a rails application I need to upgrade to the latest version > of Ruby and Ruby on Rails. > > It is currently using: > > Ruby version 1.8.7 and > Ruby on Rails version 2.3.5 > > Is there any information, tutor

[Rails] Rails 3.2 engine layouts

2012-04-07 Thread John Beynon
Hi, Is any one able to answer a question I have relating to Rails 3.2 engine layouts - http://stackoverflow.com/questions/10042348/rails-3-2-engine-layouts I'll paste below too; I'm struggling to understand how Rails 3.2 applies layouts when using mountable engines. Scenario: I'm building a

Re: [Rails] Re: Upgrading to Rails 3

2012-04-07 Thread Colin Law
On 6 April 2012 20:35, Gurdipe Dosanjh wrote: > Hi All, > > Re: Upgrading to Rails 3 > > I am working on a rails application I need to upgrade to the latest version > of Ruby and Ruby on Rails. Make sure your automated test coverage is complete before you start, then you can be reasonably confide

Re: [Rails] Upgrading to Rails 3

2012-04-07 Thread Gurdipe Dosanjh
Hi Chirag , Thanks mate, I'll definitely checkout these rails casts out. Gurdipe On 7 April 2012 06:30, Chirag Singhal wrote: > Hi Gurdipe, > > There is a series of RailsCasts that you can watch to get a reasonable > idea of how to approach the upgrade. > http://railscasts.com/episodes?sear

Re: [Rails] Upgrading to Rails 3

2012-04-07 Thread Gurdipe Dosanjh
Hi Jason, Thanks for the awesome brilliant reply, it’s been a great help to me. Gurdipe On 6 April 2012 21:16, Jason Fleetwood-Boldt wrote: > > > Check out > http://guides.rubyonrails.org/3_0_release_notes.html > > > It is my personal recommendation that you do three things: > > 1) Create fr

Re: [Rails] List all Models, Controllers, Views and Tests

2012-04-07 Thread Gurdipe Dosanjh
Hi Rogerio, Thanks for the awesome brilliant reply, it’s been a great help to me. Gurdipe On 7 April 2012 02:38, Rogerio Medeiros wrote: > Hello > > in ur app, get models > > Dir['app/models/*.rb'].map {|f| File.basename(f, > '.*').camelize.constantize } > def get_model_names_sub >