Re: [Rails] Re: undefined method `posts_path'

2011-05-21 Thread Colin Law
On 22 May 2011 07:41, John shelfer wrote: > > > On May 21, 2:45 pm, Frederick Cheung > wrote: >> On May 21, 4:22 pm, John shelfer wrote: >> >> > On May 21, 5:13 am, Colin Law wrote: >> >> >    yes i added a resource and now router.rb look likes but same issue >> > is still there >> >> > Check::

[Rails] Re: polymorphic reference deeper ?

2011-05-21 Thread Niklas Nson
Got it working, you are my hero! On 21 Maj, 17:00, Matt Jones wrote: > On May 20, 11:48 am, Niklas Nson wrote: > > > > > > > I have made myself a small activity model like this => > > > # == Schema Information > > # Schema version: 20110519174324 > > # > > # Table name: activities > > # > > #  i

[Rails] Re: undefined method `posts_path'

2011-05-21 Thread John shelfer
On May 21, 2:45 pm, Frederick Cheung wrote: > On May 21, 4:22 pm, John shelfer wrote: > > > On May 21, 5:13 am, Colin Law wrote: > > >    yes i added a resource and now router.rb look likes but same issue > > is still there > > > Check::Application.routes.draw do > >   get "posts/index" > >  r

[Rails] Re: polymorphic reference deeper ?

2011-05-21 Thread Niklas Nson
Thanks Matt, Now i just have to figure out how to do the "calling more methods on the object". I havent seen or used "#{item.class.name.underscore}" so i guess the key are in that - hopefully i dig into this. /Niklas. On 21 Maj, 17:00, Matt Jones wrote: > On May 20, 11:48 am, Niklas Nson wrot

[Rails] Re: views w locale default template

2011-05-21 Thread Erwin
just tried .. doesn't work ... @template is bypassed ActionView::MissingTemplate: Missing template user_mailer/ membership_renew with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :haml], :formats=>[:html], :locale=>[:en_GB]} in view paths "/Users/yves/Sites/rails/testsbga/app/views" it sho

[Rails] Re: views w locale default template

2011-05-21 Thread Erwin
Thanks Walter, I was using a trick : class ActionMailer::Localized < ActionMailer::Base private # we override the template_path to render localized templates (since rails does not support that :-( ) # This thing is not testable since you cannot access the instance of a mailer... def initialize

[Rails] Thetis ver.1.0.0 Released!

2011-05-21 Thread Shintaro
Hi all, We have just released Thetis ver.1.0.0, the latest version of the World-Strongest Open-Source Groupware (Web Collaboration Suite) based on RoR. It is absolute free, under the terms of Modified BSD License. * Try our Demo http://sysphonic.com/thetis/ * Download http://sysphonic.com/

Re: [Rails] Escaping characters in links

2011-05-21 Thread tommy xiao
hi, have a try: <%= link_to type.name, "#{types_path(type.name)}" %> keep the second parameter is string,right? 2011/5/21 tashfeen.ekram > I have the below link I am generating and type.name returns some > strings with a forward slash ("/"). This of course messes up routing. > I would like to

[Rails] Re: Got mad with encodings again - SOLVED

2011-05-21 Thread comopasta Gr
SOLVED -- 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 rubyonrails-talk+uns

[Rails] Re: Got mad with encodings again

2011-05-21 Thread comopasta Gr
comopasta Gr wrote in post #60: > Hi, > > I'm in trouble with encoding again. > I have a text area. Where I can enter sentences. And when a sentence > that contains multiple lines is typed I get this into the DB: > > (json serialized) > > --- "{\"text\":[\"line one\\r\\nline two\"]}" > > Ok. Wh

[Rails] Re: RoR and problem with connection to MySQL database

2011-05-21 Thread Manny 777
Thanks Tom, finally it works for me! :) -- 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, s

Re: [Rails] Mac OSX Leopard + rails3 problems

2011-05-21 Thread Tom Meinlschmidt
it's self explanatory .. or not? if you want to get rid off this messages, downgrade slightly your rubygems has_rdoc will be removed from rubygems, and as this is still present in the source gemspec of given packages, you get this message tom On May 21, 2011, at 22:43 , Tomas R. wrote: > I Ju

[Rails] Mac OSX Leopard + rails3 problems

2011-05-21 Thread Tomas R.
I Just installed ruby 1.8.7, rubygems 1.8.3 i think and Rails 3.0.7 and I get this messages everywhere tomas$ rails s NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2011-10-01. Gem::Specification#has_rdoc= called from /opt/local/lib/ruby/gems/

Re: [Rails] Re: views w locale default template

2011-05-21 Thread Walter McGinnis
On May 21, 2011, at 11:55 PM, Erwin wrote: > I agree , not very clear I was referring to mailer template > views > I tested many cases and it seems I need to define .en_GB views > ( including the locale) > > I am using already the fallback... > config.i18n.fallbacks = true > config.i

Re: [Rails] Re: RoR and problem with connection to MySQL database

2011-05-21 Thread Tom Meinlschmidt
Hi, in mysql console create database database_name; grant all on database.* to username@localhost identified by 'password'; flush privileges; tom On May 21, 2011, at 21:00 , Manny 777 wrote: > Hi Martin, > > why is not possible to use the user "root"? > > Could you please give me know, how t

[Rails] Re: RoR and problem with connection to MySQL database

2011-05-21 Thread Manny 777
Hi Martin, why is not possible to use the user "root"? Could you please give me know, how to do the new user with grant permission? (no experience with GRANT yet). Thanks in advance. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Goog

Re: [Rails] RoR and problem with connection to MySQL database

2011-05-21 Thread Martin Aceto
On Sat, May 21, 2011 at 3:41 PM, Manny 777 wrote: > Hello, > > I am building my first application with MySQL database and I am solving > this problem - my app can't to connect to MySQL server. > > MySQL server is running, in terminal (I am working at Mac) I created > MySQL table and I set passwor

[Rails] request.format = :mobile causes error "undefined method `ref' for nil:NilClass"

2011-05-21 Thread Jason FB
I have a strange problem with setting request.format = :mobile I can reproduce this problem on a completely fresh Rails 3.0.7 app with no special gems. This seemed to work well in Rails 2 but for some reason is hiccuping here, not sure what's different in Rails 3 that makes this hiccup. If you loo

[Rails] Re: undefined method `posts_path'

2011-05-21 Thread Frederick Cheung
On May 21, 4:22 pm, John shelfer wrote: > On May 21, 5:13 am, Colin Law wrote: > >    yes i added a resource and now router.rb look likes but same issue > is still there > > Check::Application.routes.draw do >   get "posts/index" >  resources :post resources should be plural, ie resources :po

[Rails] RoR and problem with connection to MySQL database

2011-05-21 Thread Manny 777
Hello, I am building my first application with MySQL database and I am solving this problem - my app can't to connect to MySQL server. MySQL server is running, in terminal (I am working at Mac) I created MySQL table and I set password to MySQL with using following command: mysqladmin -u root pas

Re: [Rails] Re: Re: Issues implementing ajax for the config for Rails 2.0.2 and Ruby 1.8.7. Jquery/Scriptaculous

2011-05-21 Thread Walter Davis
On May 21, 2011, at 12:38 PM, Mohnish J. wrote: Hi Walter, Can you please elaborate on how exactly I would be able to use Event.preventDefault() with a conditional..?. Also why would I need to use a conditional..? I ask this as I am a newbie to Jquery and my javascript fundas are not very good

[Rails] Re: Translate (internationalize) entire pages - best practice?

2011-05-21 Thread Alexey Petrushin
the design made by this guy http://arcsin.se/, big thanks to him, and it's free http://templates.arcsin.se/ -- 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

Re: [Rails] Text content must be uncopyable

2011-05-21 Thread rajeevsharma86
Thanks but i need to do something like this screenshot is fine any idea how to do this On Sat, May 21, 2011 at 10:07 PM, Walter Davis wrote: > > On May 21, 2011, at 11:55 AM, rajeevsharma86 wrote: > > On Sat, May 21, 2011 at 8:04 PM, Walter Davis wrote: >> On May 21, 2011, at 7:13 AM, Rajeev k

Re: [Rails] Re: 3 Questions about devise

2011-05-21 Thread radhames brito
On Sat, May 21, 2011 at 1:37 AM, egervari wrote: > Thank you very much for the reply Radhames Britto > > I immediately tried your first 2 suggestions and they worked out > great. My suggestion for the #2 problem is to put this in the top- > level documentation on the github page (if you have the

[Rails] Re: Re: Issues implementing ajax for the config for Rails 2.0.2 and Ruby 1.8.7. Jquery/Scriptaculous

2011-05-21 Thread Mohnish J.
Hi Walter, Can you please elaborate on how exactly I would be able to use Event.preventDefault() with a conditional..?. Also why would I need to use a conditional..? I ask this as I am a newbie to Jquery and my javascript fundas are not very good. To make it easier for you to answer this for m

Re: [Rails] Text content must be uncopyable

2011-05-21 Thread Walter Davis
On May 21, 2011, at 11:55 AM, rajeevsharma86 wrote: On Sat, May 21, 2011 at 8:04 PM, Walter Davis wrote: On May 21, 2011, at 7:13 AM, Rajeev kannav wrote: Hi, i need to make a web page that must be uncopyable With or without Javascript For example i searched http://www.learnerstv.com/le

[Rails] Re: Problem with creating a sample application.

2011-05-21 Thread QAS WM
have you run bundle install? do gem list --local to be able to see if the mysql gem is actually installed or not. if not the bundle install should install it for you and you should then be able to proceed. -- Posted via http://www.ruby-forum.com/. -- You received this message because you a

[Rails] Re: windows XP, ruby 1.9.1, rails 3, sass problem

2011-05-21 Thread Luis Lavena
On May 21, 11:48 am, Aashish Kiran wrote: > > I added sass gem to gem file, to generate  css file from scss file. > I checked folder/file permissions, Folder/File has full control. > Sometimes permission denied might occur when the file is been used by other program. does public/stylesheets/style

[Rails] Problem with creating a sample application.

2011-05-21 Thread Suman
Hi Community, I'm new to rails. I was trying to install and run a sample ruby on rails application with database as mysql. I have followed the steps for the installation. However when I start the "rails server" I get the below error. "Could not find gem 'mysql2 (>= 0)' in any of the gem sources l

Re: [Rails] Text content must be uncopyable

2011-05-21 Thread rajeevsharma86
did you looked at the link i given above Thanks On Sat, May 21, 2011 at 8:04 PM, Walter Davis wrote: > On May 21, 2011, at 7:13 AM, Rajeev kannav wrote: > > Hi, >> >> i need to make a web page that must be uncopyable With or without >> Javascript >> >> For example i searched >> >> >> >> http:/

[Rails] Re: windows XP, ruby 1.9.1, rails 3, sass problem

2011-05-21 Thread Aashish Kiran
Luis Lavena wrote in post #184: > On May 21, 10:54am, Aashish Kiran wrote: >> Hi, >> >> I am working on windows XP, ruby 1.9.1, rails 3, sass gem. Create a sass >> folder >> in >> >> C:\Documents and Settings\Administrator\rails_app >> > > Can you create your application in a directory without

Re: [Rails] Re: windows XP, ruby 1.9.1, rails 3, sass problem

2011-05-21 Thread Rodrigo Mendonça
Windows is not so good to ruby, you will have ever many problems 2011/5/21 Luis Lavena > On May 21, 10:54 am, Aashish Kiran wrote: > > Hi, > > > > I am working on windows XP, ruby 1.9.1, rails 3, sass gem. Create a sass > > folder > > in > > > > C:\Documents and Settings\Administrator\rails_app

[Rails] Re: windows XP, ruby 1.9.1, rails 3, sass problem

2011-05-21 Thread Luis Lavena
On May 21, 10:54 am, Aashish Kiran wrote: > Hi, > > I am working on windows XP, ruby 1.9.1, rails 3, sass gem. Create a sass > folder > in > > C:\Documents and Settings\Administrator\rails_app > Can you create your application in a directory without spaces? (Documents and Settings have spaces in

[Rails] Re: undefined method `posts_path'

2011-05-21 Thread John shelfer
On May 21, 5:13 am, Colin Law wrote: > On 21 May 2011 10:00, john shelfer wrote: > > > > > > > > > > > > > On Sat, May 21, 2011 at 4:05 AM, Colin Law wrote: > > >> On 21 May 2011 05:18, John shelfer wrote: > > >> >> Please run rake routes and post that here > >> >  rake routes shows > >> >  p

[Rails] Re: polymorphic reference deeper ?

2011-05-21 Thread Matt Jones
On May 20, 11:48 am, Niklas Nson wrote: > I have made myself a small activity model like this => > > # == Schema Information > # Schema version: 20110519174324 > # > # Table name: activities > # > #  id         :integer         not null, primary key > #  account_id :integer > #  action     :stri

[Rails] windows XP, ruby 1.9.1, rails 3, sass problem

2011-05-21 Thread Aashish Kiran
Hi, I am working on windows XP, ruby 1.9.1, rails 3, sass gem. Create a sass folder in C:\Documents and Settings\Administrator\rails_app Now I start server, I get following error Errno::EACCES (Permission denied - C:/Documents and Settings/Administrator/rails_app/public/stylesheets/ style.css

Re: [Rails] Re: Issues implementing ajax for the config for Rails 2.0.2 and Ruby 1.8.7. Jquery/Scriptaculous/Pro

2011-05-21 Thread Walter Davis
On May 21, 2011, at 9:27 AM, Mohnish J. wrote: How can i display the same onclick of a button without making/getting the entire page to reload.. With Event.preventDefault(). If in Prototype, with Event.stop(). Be sure to wrap this method in a conditional, otherwise you have just killed th

Re: [Rails] Cookies - Written by Javascript Read by Rails

2011-05-21 Thread Walter Davis
On May 21, 2011, at 9:33 AM, Bharat Ruparel wrote: Is there a way for Rails to read cookies written by a Javascript and read by Rails? -- I am integrating a third party software service which writes a cookie to the user's browser which contains routing information. I need to make sure that

Re: [Rails] Text content must be uncopyable

2011-05-21 Thread Walter Davis
On May 21, 2011, at 7:13 AM, Rajeev kannav wrote: Hi, i need to make a web page that must be uncopyable With or without Javascript For example i searched http://www.learnerstv.com/lecturenotes/lecturenotes.php?note=44&cat=Physics But this is not the best option i feel which tool should i us

[Rails] Re: Google Maps and returning compatible data

2011-05-21 Thread QAS WM
PsiPro wrote in post #38: > You would be best, IMHO, using a hash and rewriting the JS to be a bit > more intelligent when adding the markers. Unfortunately I am not that good in JavaScript so was trying to match the input with what the script was using. I have modified the controller as suc

[Rails] Cookies - Written by Javascript Read by Rails

2011-05-21 Thread Bharat Ruparel
Is there a way for Rails to read cookies written by a Javascript and read by Rails? -- I am integrating a third party software service which writes a cookie to the user's browser which contains routing information. I need to make sure that the Rails app and the third party app both have the same

[Rails] Re: Issues implementing ajax for the config for Rails 2.0.2 and Ruby 1.8.7. Jquery/Scriptaculous/Pro

2011-05-21 Thread Mohnish J.
Hello Fred, Thanks for your enlightening inputs... I am sorry if some part of my question made you say/infer that what I am trying ask is upload an image via AJAX.. What I exactly meant to say..is after I am fetching an image from the filesystem.. How can i display the same onclick of a button

[Rails] Re: views w locale default template

2011-05-21 Thread Erwin
I agree , not very clear I was referring to mailer template views I tested many cases and it seems I need to define .en_GB views ( including the locale) I am using already the fallback... config.i18n.fallbacks = true config.i18n.default_locale = :en_EN but I am concerned by mailer ? which

[Rails] Text content must be uncopyable

2011-05-21 Thread Rajeev kannav
Hi, i need to make a web page that must be uncopyable With or without Javascript For example i searched http://www.learnerstv.com/lecturenotes/lecturenotes.php?note=44&cat=Physics But this is not the best option i feel which tool should i use Flash or etc Can you please tell me how i can i do

Re: [Rails] Carrier wave image upload issue..

2011-05-21 Thread Colin Law
On 21 May 2011 11:48, Mohammed Niyas wrote: > Hi All, > >   I am using Carrierwave gem for image upload functionality in our > application and it works fine for me. I was trying to implement the same > functionality for another page but it doesn't works and it doesn't shows > any error at all, but

[Rails] Carrier wave image upload issue..

2011-05-21 Thread Mohammed Niyas
Hi All, I am using Carrierwave gem for image upload functionality in our application and it works fine for me. I was trying to implement the same functionality for another page but it doesn't works and it doesn't shows any error at all, but the image was not uploaded in the s3 bucket. Anyone pl

[Rails] Re: Issues implementing ajax for the config for Rails 2.0.2 and Ruby 1.8.7. Jquery/Scriptaculous/Prototy

2011-05-21 Thread Frederick Cheung
On May 21, 10:59 am, "Mohnish J." wrote: > Hello all, > > I am trying to render via javascript a post and an image in my rails > app. My app has the config of Ruby 1.8.7 and Rails 2.0.2 . > > With great difficulty I have found a suitable version of > paperclip(https://github.com/thoughtbot/pape

[Rails] rails3 mailer .. how to use a safe mailer not taking in account the I18n.locale

2011-05-21 Thread Erwin
in a multilingual site dev, I need to send localized emails... as I need to define the @template in the mailer method, I don't want to take in account the I18n.locale: I wrote in my mailer method def welcome(user, message) @user = user language = user.language # es_ES testing

[Rails] Issues implementing ajax for the config for Rails 2.0.2 and Ruby 1.8.7. Jquery/Scriptaculous/Prototy

2011-05-21 Thread Mohnish J.
Hello all, I am trying to render via javascript a post and an image in my rails app. My app has the config of Ruby 1.8.7 and Rails 2.0.2 . With great difficulty I have found a suitable version of paperclip( https://github.com/thoughtbot/paperclip/commit/d177c8f838458348a9f4d1fe41918c5bd99a989c )

[Rails] Re: Re: Unable to figure out why a photo attribute of the paperclip plugin is not being passed in as

2011-05-21 Thread Mohnish J.
Hi Bryan, After taking in some inputs from another forum and combining those with something I tried.. it finally works..The code that works is like this:- <%form_for :group_post, @group_post, :url => {:action => :post_message, :id => params[:id]},:html => {:multipart => true}, :id => 'new_post'

Re: [Rails] Re: undefined method `posts_path'

2011-05-21 Thread Colin Law
On 21 May 2011 10:00, john shelfer wrote: > > > On Sat, May 21, 2011 at 4:05 AM, Colin Law wrote: >> >> On 21 May 2011 05:18, John shelfer wrote: >> > >> >> Please run rake routes and post that here >> >  rake routes shows >> >  posts_index GET /posts/index(.:format) >> > {:action=>"index", :con

Re: [Rails] Re: undefined method `posts_path'

2011-05-21 Thread john shelfer
On Sat, May 21, 2011 at 4:05 AM, Colin Law wrote: > On 21 May 2011 05:18, John shelfer wrote: > > > >> Please run rake routes and post that here > > rake routes shows > > posts_index GET /posts/index(.:format) > > {:action=>"index", :controller=>"posts"} > > > > What does your routes.rb look l

[Rails] Re: Rails DB defaults to utf8 for mysql -- but unicode for postgresql

2011-05-21 Thread comopasta Gr
> According to http://www.postgresql.org/docs/8.4/static/multibyte.html > Unicode as an encoding name is just an alias for UTF8. Earlier > versions only list Unicode as the name of that encoding, so I assuming > this means that setting the name unicode ensures that a range of > postgresql versions

Re: [Rails] Re: undefined method `posts_path'

2011-05-21 Thread Colin Law
On 21 May 2011 05:18, John shelfer wrote: > >> Please run rake routes and post that here >  rake routes shows >  posts_index GET /posts/index(.:format) > {:action=>"index", :controller=>"posts"} > > What does your routes.rb look like? > router.rb file looks like: > > Check::Application.routes.draw

[Rails] Re: Translate (internationalize) entire pages - best practice?

2011-05-21 Thread Stefano
My project is currently on hold due to my university exams coming up, so lots of studying... i will definitely come back to this once my exams are over. I had a look at your page and like the design very much, so clean. regards stefano On May 21, 4:28 am, Alexey Petrushin wrote: > I just recen

[Rails] Re: Rails DB defaults to utf8 for mysql -- but unicode for postgresql

2011-05-21 Thread Frederick Cheung
On May 21, 12:29 am, comopasta Gr wrote: > Hi, > > Creating a new Rails application with -d postgresql sets the encoding in > the database.yml to unicode > > Creating a new Rails with -d mysql sets the encoding to utf8 > According to http://www.postgresql.org/docs/8.4/static/multibyte.html Unic

[Rails] How do you create a sub-layout or a partial that wraps a lot of custom html?

2011-05-21 Thread egervari
Basically I'd like to create a layout inside of a layout using erb. Something like this: <%= render :partial => 'support' do %> <%= @help_document.question %> <%= @help_document.content %> Was this information helpful? Yes or No <% end %> Is this possi