Re: [Rails] Re: A way to share a variable across multiple httpd threads with Rails?

2011-03-10 Thread Frederick Cheung
On 9 Mar 2011, at 19:34, Chad Johnson li...@ruby-forum.com wrote: Frederick Cheung wrote in post #986539: On 9 Mar 2011, at 17:47, Chad Johnson li...@ruby-forum.com wrote: Thread.current[mycount] = count count += 1 } end This looks thread dangerous

[Rails] Re: How to install rails_tiny_mce in Rails2.3.10

2011-03-10 Thread jaron
This is the error trace. ./script/generate rails_tiny_mce_migration /Library/Ruby/Gems/1.8/gems/activesupport-2.3.10/lib/active_support/ dependencies.rb:466:in `load_missing_constant': uninitialized constant TinyMCE::OptionValidator (NameError) from

[Rails] Re: How to use unicorn server on Rails 3

2011-03-10 Thread Julien Palmas
`unicorn_rails` n'est en effet pas recommandé pour les apps rails 3 http://unicorn.bogomips.org/unicorn_rails_1.html quote It is designed to help Rails 1.x and 2.y users transition to Rack, but it is NOT needed for Rails 3 applications. Rails 3 users are encouraged to use unicorn(1) instead of

Re: [Rails] Re: CMS (Content Management System) based on RoR

2011-03-10 Thread Mickael Gerard
Hi, you also have this one : http://www.locomotivecms.com/ which integrates with s3 and Heroku On 10 March 2011 04:13, Ratnam Raj varasala chinnuj...@gmail.com wrote: Yes Refinery is also fine, I have worked both of them. On Wed, Mar 9, 2011 at 8:43 PM, Bruno Santos brunosp...@gmail.com

Re: [Rails] JS data to rails view helper

2011-03-10 Thread radhames brito
On Wed, Mar 9, 2011 at 10:55 PM, Me chabg...@gmail.com wrote: Ya I have seen that. How does that apply to what I am doing? grab the input:select with jquery, is easy, the video shows a bit about dealing with selects, after that $.ajax{ type: 'POST', url: 'controller/action' data : { value:

Re: [Rails] Multi-model forms

2011-03-10 Thread radhames brito
http://railscasts.com/episodes/196-nested-model-form-part-1 http://railscasts.com/episodes/197-nested-model-form-part-2 -- 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.

Re: [Rails] Generating Unique Tokens for Assets within Rails Application

2011-03-10 Thread radhames brito
you want to generate a nonce (number used once), i have seen this behavior, i think devise uses a similar approach for token authentication, what you do is you create a route that catches the token match blah/:token to create Token.create(:nonce=Digest::MD5.hexdigest(rand(9)))

[Rails] Re: Problem with mailer

2011-03-10 Thread Paul Bergstrom
Vladimir Rybas wrote in post #986535: Post your mailer content here: http://pastie.org/ As well as stack trace. Stack level too deep could mean you got an infinite loop. Maybe you're calling method inside itself. I have a test method as: def test Notifier.message().deliver end And a

[Rails] Link_to onclick -javascript call

2011-03-10 Thread Chandu80
Hello All, I have a link_to function for a link as follows %=link_to Reply ,{},:href=#,:class = replyMessage noBackgroundImage ,:title =Click here to reply,:onclick = popup('popUpDiv_reply');showName('%= h message.chid %','channeltopost');% When I try to run the file with the onclick as defined

[Rails] Re: Problem with mailer

2011-03-10 Thread Paul Bergstrom
Got it working. I tried with a new mailer, using the same name as a controller and model, and I changed :enable_starttls_auto = true to false (as I got an ssl cert error). -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] Re: Link_to onclick -javascript call

2011-03-10 Thread Tim Shaffer
What does the generated source code look like? I'm guessing the value of message.chid might be messing up the HTML. Also, have you considered using link_to_function instead of using link_to. Might clean up your code a little bit.* * -- You received this message because you are subscribed to

[Rails] Craft Beer and Ruby

2011-03-10 Thread luna...@gmail.com
Does anyone know of a website that uses Ruby and is focused on craft beer? We are wondering if we are the first website to do so - we are developing www.brewfans.com - and should be up and running by the end of April. We are looking for coding partners to possibly join our team as an equity

[Rails] RUBY ON RAILS SUPPORTS MS SQL SERVER 2000?

2011-03-10 Thread Er.SALIM MANDREKAR
sir, I need some assistance from u regarding the ROR. I have one serious doubt in it. we have MS SQL server 2000 as a database and since we are shifting now to ROR from Classic ASP VB6.0 we don't have much knowledge about this. can you tell me ROR can be used with MS SQL server 2000. we can't

[Rails] cannot loop on render update

2011-03-10 Thread Erwin
I -- 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

[Rails] cannot loop in render update

2011-03-10 Thread Erwin
I am trying to perform a multi update Ajax on a page if the loop is outside the p -- 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

[Rails] trying to loop a render update page

2011-03-10 Thread Erwin
I trying to update multi times a page from inside a loop, obviously the loop cannot be outside the update block as a test I wrote : def reloading @tables = [table_lockers, table_instructors, table_members, table_analyses] render :update do |page| @tables.each do |table|

Re: [Rails] Re: Ruby gems version mismatch

2011-03-10 Thread Bryan Crossland
On Wed, Mar 9, 2011 at 9:02 PM, Anshu Agr li...@ruby-forum.com wrote: You're application is looking for rails 2.3.4 and you have 2.3.10 loaded. Do you have a rails version specified in your environments.rb file? No my enviroment.rb file has 2.3.10. I see you've posted this error in

Re: [Rails] trying to loop a render update page

2011-03-10 Thread Walter Lee Davis
On Mar 10, 2011, at 8:18 AM, Erwin wrote: I trying to update multi times a page from inside a loop, obviously the loop cannot be outside the update block as a test I wrote : def reloading @tables = [table_lockers, table_instructors, table_members, table_analyses] render :update do

[Rails] Parslet Stack size

2011-03-10 Thread PsiPro
Hello all, I am using parslet to do some log-file parsing and have run into the stack level too deep error, and I am only half-way though with writing the rules for a single line to be parsed. From what I gathered there is no option to easily increase the stack size, it would require rebuilding

Re: [Rails] Parslet Stack size

2011-03-10 Thread Jeffrey L. Taylor
Quoting PsiPro arjes...@gmail.com: Hello all, I am using parslet to do some log-file parsing and have run into the stack level too deep error, and I am only half-way though with writing the rules for a single line to be parsed. I don't know the specific technology in Parslet, but if it's

[Rails] Re: ActiveRecord serialize method not returning YAML array in test environment.

2011-03-10 Thread Marcin Seroczyński
After all to bypass this I needed to call the data in database directly without involvement of serialize AR method. YAML::load(User.first.roles_before_type_cast) And now test environment also directly parses the data and give me correct roles Array. On 9 Mar, 19:24, Marcin Seroczyński

Re: [Rails] RUBY ON RAILS SUPPORTS MS SQL SERVER 2000?

2011-03-10 Thread radhames brito
see if this helps https://github.com/rails-sqlserver/activerecord-sqlserver-adapter -- 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,

[Rails] Re: trying to loop a render update page

2011-03-10 Thread Erwin
Thanks ... I am looking at the http://railscasts.com/episodes/229-polling-for-changes this is quite obvious ( because it's async..) ... only the client page can request periodic updates ... On 10 mar, 15:28, Walter Lee Davis wa...@wdstudio.com wrote: On Mar 10, 2011, at 8:18 AM, Erwin wrote:

[Rails] last inserted id

2011-03-10 Thread Victor Manuel AG
Hi, i have a problem inserting an data in a database I'm doing a multiple saved in BD touring cycle in each saved me the id should return the remains, or saved for insert in the table below. The problem is that I always return the first id is saved This is my code value.each do |item|

Re: [Rails] rows go missing through apache, but works fine in mongrail

2011-03-10 Thread Bryan Crossland
This sounds like an Apache and Java timing/buffering issue. Since this is a forum for Ruby on Rails I doubt you will find the answers you are looking for here since you are neither using Ruby nor Rails. B. On Thu, Mar 10, 2011 at 1:41 AM, abhishek m. li...@ruby-forum.com wrote: Hi, In my

Re: [Rails] Link_to onclick -javascript call

2011-03-10 Thread Phil Crissman
Phil On Thu, Mar 10, 2011 at 5:22 AM, Chandu80 chandu.she...@gmail.com wrote: Hello All, I have a link_to function for a link as follows %=link_to Reply ,{},:href=#,:class = replyMessage noBackgroundImage ,:title =Click here to reply,:onclick = popup('popUpDiv_reply');showName('%= h

Re: [Rails] Re: How to install rails_tiny_mce in Rails2.3.10

2011-03-10 Thread Bryan Crossland
On Thu, Mar 10, 2011 at 2:16 AM, jaron inepa...@gmail.com wrote: This is the error trace. ./script/generate rails_tiny_mce_migration /Library/Ruby/Gems/1.8/gems/activesupport-2.3.10/lib/active_support/ dependencies.rb:466:in `load_missing_constant': uninitialized constant

[Rails] Re: Parslet Stack size

2011-03-10 Thread PsiPro
I don't know the specific technology in Parslet, but if it's a typical recursive descent parser, you have to write your rules for lists a particular way, otherwise they become infinite recursion. The two ways are: list ::= word | word list and list ::= word | list word I followed the

[Rails] Re: invalid json response when using devise plugin

2011-03-10 Thread John Merlino
Has anyone gotten devise to work at all with any kind of ajax? -- 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

[Rails] Re: How to install rails_tiny_mce in Rails2.3.10

2011-03-10 Thread jaron
The follow install command run failed: ./script/plugin install --branch rails_2.x git://github.com/sandipransing/rails_tiny_mce.git Plugin not found: [rails_2.x, git://github.com/sandipransing/ rails_tiny_mce.git] I try to download the plugin for rails 2.x in the page

[Rails] Re: How to install rails_tiny_mce in Rails2.3.10

2011-03-10 Thread kwiest
Jaron, I've played around with the TinyMCE plugins for Rails 2, 3 and every time I've found it to be MUCH easier to just download the files from http://tinymce.moxiecode.com/download/download.php, drop them in your public folder and you should be good to go. On Mar 10, 9:14 am, jaron

Re: [Rails] Re: How to install rails_tiny_mce in Rails2.3.10

2011-03-10 Thread Bryan Crossland
On Thu, Mar 10, 2011 at 11:14 AM, jaron inepa...@gmail.com wrote: The follow install command run failed: ./script/plugin install --branch rails_2.x git:// github.com/sandipransing/rails_tiny_mce.git Plugin not found: [rails_2.x, git://github.com/sandipransing/ rails_tiny_mce.git] I think

[Rails] Re: A way to share a variable across multiple httpd threads with Rails?

2011-03-10 Thread Matt Jones
On Mar 9, 2:34 pm, Chad Johnson li...@ruby-forum.com wrote: Frederick Cheung wrote in post #986539: On 9 Mar 2011, at 17:47, Chad Johnson li...@ruby-forum.com wrote:            Thread.current[mycount] = count            count += 1          }        end This looks thread dangerous

[Rails] Re: rows go missing through apache, but works fine in mongrail

2011-03-10 Thread Matt Jones
On Mar 10, 2:41 am, abhishek m. li...@ruby-forum.com wrote: Hi, In my site, I have implemented a functionality where we can fetch upto 10 rows and display all of it at one shot on the GUI, through Java interface. Now, when I start my client through mongrail ( ./script/server -e

[Rails] Rails 3 and problem with conditions - no results

2011-03-10 Thread Manny 777
Hi there, I try to make simple search items in database, but unfortunately, I cant to get the results... always. I am trying to search the items with using of following command: @data = Data.find(:all, :conditions = { :name = 'abcd' }) But unfortunately, I am not getting any result... Of

[Rails] Validates uniqueness two columns both ways?

2011-03-10 Thread Danimal
Hello! I'm trying to figure out how to make two columns unique regardless of order. If order mattered, I could scope the validates_uniqueness_of, like this: http://stackoverflow.com/questions/1633297/how-do-i-validate-two-fields-for-uniqueness But that's only one way. What if I have two

Re: [Rails] Rails 3 and problem with conditions - no results

2011-03-10 Thread Bryan Crossland
On Thu, Mar 10, 2011 at 12:36 PM, Manny 777 li...@ruby-forum.com wrote: Hi there, I try to make simple search items in database, but unfortunately, I cant to get the results... always. I am trying to search the items with using of following command: @data = Data.find(:all, :conditions = {

[Rails] Problem with making Rails Web App - Netbeans IDE

2011-03-10 Thread Superpelican X.
Hello everybody, first I would like to tell you I'm new to this forum and Ruby. I tried Hackety Hack (www.hacketyhack.com). I love the Ruby language, since it' s great to learn for beginners. It uses simple English-like commands. And is very Linux-friendly (as I use Xubuntu 10.10). Now I

Re: [Rails] Problem with making Rails Web App - Netbeans IDE

2011-03-10 Thread radhames brito
Best advice we can give you is : use the console, always, no matter what ide you are using. -- 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

[Rails] Stack level too deep problem

2011-03-10 Thread Mo Al
Hi I am getting a Stack level too deep error when i try creating a new critical process object: here is the code: class Role ActiveRecord::Base has_many :authorizations has_many :critical_processes, :through = :authorizations has_many :assignments has_many :users, :through =

[Rails] Re: Installing Rails and Ruby Mine

2011-03-10 Thread krishnau2
Sorry for the delayed response. http://rubykoans.com/ This will help you for learning Ruby language by your self. I have learned most of Ruby through this. I think you should first go through http://guides.rubyonrails.org/getting_started.html and work out the example blog application they have

Re: [Rails] Rake task error

2011-03-10 Thread Colin Law
On 9 March 2011 11:44, anu anuhema1...@gmail.com wrote: hi friend,             If  i am running the rake task in my rails 3 application i am getting execution expired.How to resolve this error You will have to give us a few more clues. Which OS are you using? Which versions of Ruby and Rails?

[Rails] increment?

2011-03-10 Thread Mark
Hi I am wondering if anyone can assist with this: I have two models, one is task and the other is examples. I have developed an application that once you create a new task you are given 5 example fields. What I need is when a user wants to create a new task, he/she is given a list of five

[Rails] Rails 3 renaming routes

2011-03-10 Thread Robert
I am just getting started with Rails 3 and I do not quite understand how to go about renaming routes. **What I want:** To rename the path to the users#show controller/action pair. So instead of the URL being www.example.com/users/show/1 it would just be www.example.com/1/home In the future,

[Rails] Collection add saves to the database twice

2011-03-10 Thread danm
I've got something weird happening in the code (using Rails 3.0). I have a ton of has_many/belongs_to relationships in my application and I save the child objects like this: if parent.child_collection child #do success code else #do error code end The problem is that this ends up with

Re: [Rails] Collection add saves to the database twice

2011-03-10 Thread Bryan Crossland
On Thu, Mar 10, 2011 at 3:00 PM, danm dmuch...@gmail.com wrote: I've got something weird happening in the code (using Rails 3.0). I have a ton of has_many/belongs_to relationships in my application and I save the child objects like this: if parent.child_collection child #do success code

Re: [Rails] increment?

2011-03-10 Thread Colin Law
On 10 March 2011 16:18, Mark aalhi...@gmail.com wrote: Hi I am wondering if anyone can assist with this: I have two models, one is task and the other is examples.  I have developed an application that once you create a new task you are given 5 example fields. What I need is when a user

Re: [Rails] Collection add saves to the database twice

2011-03-10 Thread Colin Law
On 10 March 2011 21:00, danm dmuch...@gmail.com wrote: I've got something weird happening in the code (using Rails 3.0).  I have a ton of has_many/belongs_to relationships in my application and I save the child objects like this: if parent.child_collection child  #do success code else  

[Rails] [ANN] mongo_translatable gem, a Ruby on Rails engine for MongoDB backed model translations, is out

2011-03-10 Thread Walter McGinnis
Hi everyone, We've been using this for awhile as a part of a feature in Kete (an open source Rails app, http://kete.net.nz) for a content translation add-on for awhile now. Thought it was about time to share. From the README: Rails specific I18n model localization meant to tie-in to existing

[Rails] Re: [ANN] mongo_translatable gem, a Ruby on Rails engine for MongoDB backed model translations, is out

2011-03-10 Thread Walter McGinnis
On Fri, Mar 11, 2011 at 11:17 AM, Walter McGinnis walter.mcgin...@gmail.com wrote: Hi everyone, We've been using this for awhile as a part of a feature in Kete (an open source Rails app, http://kete.net.nz) for a content translation add-on for awhile now. Thought it was about time to share.

Re: [Rails] Problem with making Rails Web App - Netbeans IDE

2011-03-10 Thread Vladimir Rybas
Use IDE for coding, and do all the stuff in console. There are tons of tutorials and screencasts available. All folks use terminals. You just won't be able to do anything. As I remember, the Netbeans have an option Initialize Rails project with existing sources or something like that. So you do

Re: [Rails] Re: How to install rails_tiny_mce in Rails2.3.10

2011-03-10 Thread Jatin kumar
On Thu, Mar 10, 2011 at 5:34 PM, kwiest kyle.wi...@gmail.com wrote: Jaron, I've played around with the TinyMCE plugins for Rails 2, 3 and every time I've found it to be MUCH easier to just download the files from http://tinymce.moxiecode.com/download/download.php, drop them in your public

[Rails] Re: Stack level too deep problem

2011-03-10 Thread Martin Streicher
Your associations are incorrect. Both Role and CriticalProcess refer to each other via has_many -- one of them must use belongs_to. And where is the Authorization class? What is it's relationship to CriticalProcess? Fix the associations problem and the loop will likely go away. Why? I suspect

[Rails] Re: Rails 3 and problem with conditions - no results

2011-03-10 Thread Martin Streicher
The preferred technique for Rails 3 is Data.where :name = 'abcd' I agree with Bryan you should check your data. You may need to strip the string of blanks before you save to the database. On Mar 10, 2:10 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Thu, Mar 10, 2011 at 12:36 PM, Manny

[Rails] Re: Validates uniqueness two columns both ways?

2011-03-10 Thread Martin Streicher
Two ideas: 1. Create two unique database indices, one each for each pairing order and catch the exception on save on create. 2. Do it manually. errors.add(:base, 'already exists') if (Klass.where(:sender_id = sender.id, :receiver_id = receiver.id) + Klass.where(:sender_id = receiver.id,

[Rails] Resuming a download

2011-03-10 Thread Ralph Shnelvar
Is there a document somewhere that describers how I would implement, in Rails, a resume download? I have a large video I want people to download (if they want to). My partner has a bad Internet connection and it crashed several times and he wanted to resume but the download wouldn't. How do I

[Rails] ssl_requirement plugin still maintained?

2011-03-10 Thread Todd A. Jacobs
I was looking at the official repository for ssl_requirement at https://github.com/retr0h/ssl_requirement, and the last commit was in 2008. Is this plugin still maintained? If not, what's the current equivalent for Rails 3? -- You received this message because you are subscribed to the Google

[Rails] Re: Collection add saves to the database twice

2011-03-10 Thread danm
Thanks for the tip about watching development.log, Colin. But now the mystery deepens. Using IE 8.0, EVERY AJAX call shows up twice. However, using the exact same links in Firefox 3.6.14, they only show up once. I am tailing the log file and watching it as I click on links in both browsers and

[Rails] Re: Validates uniqueness two columns both ways?

2011-03-10 Thread Danimal
Thanks, Martin! I've headed down path #2, but I thought of posting here just in case there already existed a custom validation. Maybe this isn't a very common thing. Seems to be that usually it's explicit in the direction (i.e. husband = wife relationship or employer = employee or something like

[Rails] Client side routine for user definable color scheme

2011-03-10 Thread Dan Sadaka
Hello everyone, I am working on a site that will serve multiple user accounts. Account setup will be done from an admin screen. My client wants the setup to include the upload of a logo image as well as selection of a color scheme. The elements on the page will be fixed, but the admin will be

[Rails] Re: RUBY ON RAILS SUPPORTS MS SQL SERVER 2000?

2011-03-10 Thread Er.SALIM MANDREKAR
sir i'm using MS SQL SERVER 2000 AND NOT SERVER 2005. SECONDLY I ALREADY TRIED USING THAT GEM WHICH DOESNT MAKE ANY DIFFERENCE TO THE ERRORS I'M FACING.. IF I USE MS SQL SERVER 2005 THEN ITS WORKING FINE.. NOW SUGGEST ME. I HOPE MY PROBLEM IS CLEAR TO U. THANKS. On Mar 10, 8:25 pm, radhames

[Rails] sql server 2000 with ruby on rails works???

2011-03-10 Thread Er.SALIM MANDREKAR
'm trying to use Ruby on Rails accessing a pre-existing database on SQL Server 2000. After some research I found that it should use the gem activerecord- sqlserver-adapter. Create a connection via ODBC to the desired base, and creating a database user for access it. We also configured the

Re: [Rails] ssl_requirement plugin still maintained?

2011-03-10 Thread Chris Kottom
Try rack-ssl-enforcer. It does the same thing using Rack middleware, and it's being actively maintained. https://github.com/tobmatth/rack-ssl-enforcer On Fri, Mar 11, 2011 at 2:01 AM, Todd A. Jacobs codegnome.consult...@gmail.com wrote: I was looking at the official repository for