[Rails] Re: Rails 4 Asset Pipeline in Development

2017-07-04 Thread mikej
The log stops at the line above where application.js is included. I'll have a look at NewRelic. Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[Rails] Re: Rails 4 Asset Pipeline in Development

2017-07-04 Thread mikej
Thanks for the reply. I'm not using brunch. Just the default set up. Sprockets. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsu

[Rails] Rails 4 Asset Pipeline in Development

2017-07-03 Thread mikej
I am having intermittent problems with 504 Gateway Time-out in development. This has just started happening after no changes to my application that I can think of. If I keep refreshing the page it renders eventually in less than 1 second after 2 or 3 504 Gateway Time-out errors. Every time I

[Rails] Re: Rails 4 Query on Association using Includes

2016-03-04 Thread mikej
You can also use: Model1.includes(:model2 => :model3).where(“model2s.order <= 2”).references(:model2 => :model3) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an e

[Rails] Re: Rails 4 Query on Association using Includes

2016-02-24 Thread mikej
I never worked this out, but you can use joins instead of includes as a work around. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+uns

[Rails] Rails 4 Query on Association using Includes

2016-02-17 Thread mikej
This works: Model1.includes(:model2 => :model2).where(model2s: {order: 2}) How would I write a query for order <= 2? What I would really like to write is: Model1.includes(:model2 => :model2).where(“model2s.order <= 2”) This worked in Rails 3, I would like to build up the where clause

[Rails] Re: Upgrading to Rails 4 Sprockets::ConversionError

2016-02-12 Thread mikej
Sorted. I found some unexpected files in stylesheets/images. Sorry to post, Mike -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsub

[Rails] Upgrading to Rails 4 Sprockets::ConversionError

2016-02-11 Thread mikej
I am in the process of upgrading my app to rails 4. On stylesheet_link_tag or image_tag I get the error: Sprockets::ConversionError at / could not convert "text/html" to nil In the console: helper.image_tag("accept.png") after some time I get the same error. I have emptied the sprock

[Rails] Re: Intermittent NoMethodError: undefined method `url_for' for nil:NilClass

2015-01-23 Thread mikej
Thanks. It's just a normal link_to: link_to "Edit", authenticate_edit_user_path(user) It works fine nearly all of the time. I could have picked an example from a number of link_to statements. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Intermittent NoMethodError: undefined method `url_for' for nil:NilClass

2015-01-23 Thread mikej
I am receiving the error above intermittently, rarely on the same url twice. Backtrace below. Any ideas how to debug this gratefully received. Many thanks, Mike /gems/actionpack-3.2.21/lib/action_dispatch/routing/url_for.rb:148 in "url_for" /gems/actionpack-3.2.21/lib/action_view/helpers/url_

[Rails] Internationalization Example Sites including Arabic and Chinese

2012-09-24 Thread mikej
I am looking into building a site using multiple languages. I would like to show other stakeholders how this could look. Does anyone know of any publicly accessible sites showing multiple languages? I would ideally like to see a separate sub domain for each language and see Arabic and Chin

[Rails] Rake Routes Blank on upgrade to Rails 3

2011-10-06 Thread mikej
I have just upgraded an app to rails 3 following the railscast screencast. I have installed a blank application inside the app to be upgraded with: rails new . I have replaced all the the main files. When I run rake routes I get no output. routes.rb: App::Application.routes.draw do resource

[Rails] Re: Vestal Versions Related Records

2010-04-09 Thread mikej
That would work. I like the idea of making my clients serial monogamists. However, it is a bit of a faff having to pass a date every time, or perhaps I could write this into the has_many relationship. Am I missing something? I've just added a version_id (populated with the version number) to t

[Rails] Vestal Versions Related Records

2010-04-09 Thread mikej
I need to keep version of a model Client: has_many :product_clients has_many :products, :through => :product_clients The question is what is the best way of saving versions of the association. Can I make the association using the client.version.id rather than the client.id? Or should I use

[Rails] Validating New Record with Related Records

2010-01-06 Thread mikej
I have a custom validation that validates a record by looking at related records. The problem is that until the record has been saved it has no id, therefore the relationships are not established. At the moment the validation works for updated records but not new ones. Any idea on how to validat

[Rails] errors.add_to_base translation missing: en, activerecord

2009-12-21 Thread mikej
In my model I am using errors.add_to_base: errors.add_to_base "Error 1" This works fine. If I do this twice: errors.add_to_base "Error 1" errors.add_to_base "Error 2" I receive the message: translation missing: en, activerecord, errors, models, modelname, attributes, base, as part of my erro

[Rails] Re: Gems located in 2 directories

2009-11-20 Thread mikej
Really appreciate the help here. Fedora release 11 (Leonidas) Looks like I may have 2 versions of gem command: /usr/bin/gem /usr/lib/ruby/gems/1.8/gems/rubygems-update-1.3.5/bin/gem gem -v 1.3.5 Looks like the recent update to 1.3.5 went to another directory. Not sure why - hope this provide

[Rails] Re: Gems located in 2 directories

2009-11-20 Thread mikej
Thanks for the reply. I have always installed gems with sudo gem install except on the odd occasion when I forgot the sudo. The problem is that they are now going to a different location. Mike -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk

[Rails] Gems located in 2 directories

2009-11-20 Thread mikej
I recently updated my gems and gem command with: sudo gem update --system && gem update gem list showed no local gems I installed a new gem gem list showed just the newly installed gem. My apps work fine (as far as I can tell). gem env - GEM PATHS: - /usr/lib64/ruby/gems/1.8 - /ho

[Rails] Re: Installing mysql with macports

2009-07-13 Thread mikej
Yes, I've tried upgrading and reinstalling Xcode. Still the same problem, Mike --~--~-~--~~~---~--~~ 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@googl

[Rails] Installing mysql with macports

2009-07-12 Thread mikej
Not sure if this is off topic, but there doesn't seem to be an obvious place to ask this question. I am trying to use MacPorts to install mysql. I have xcode 3.0 and x11 XQuartz 2.1.6 installed. $PATH: /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ local/bin:/usr/X11/bi Whe

[Rails] rake db:migrate confusion following Cucumber upgrade

2009-07-09 Thread mikej
I recently upgraded Cucumber gem from 0.1.16 to 0.3.11. I ran ruby script/generate cucumber. When I ran rake features I received an error telling me I had pending migrations and should run rake db:migrate. I ran rake db:migrate despite fact that my db is up to date. I was confused that the mig

[Rails] Re: Gem Trouble

2009-05-14 Thread mikej
I'm fairly sure if I enter which gem, the wrong directory is returned. Any idea how to change this? Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email

[Rails] Gem Trouble

2009-05-14 Thread mikej
No idea what I've done, I have not upgraded anything or installed new gems but if I issue a command such as gem list, rake features, rake routes or try and create a new rails project, I get the error messages: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/rubygems/custo

[Rails] Form - Tick boxes in related table

2009-04-21 Thread mikej
Sure this one is solved somewhere, but couldn't find it. I have a table which has a related table (has many through). I wish to choose 1 or more items in the related table with a check box. For example, if I had a table with group one, group two and group three and a list of clients. I would l

[Rails] Re: Order Values in a Select Box Using select

2008-10-16 Thread mikej
Splendid, 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 [EMAI

[Rails] Order Values in a Select Box Using select

2008-10-16 Thread mikej
Been trawling for a while and know there must be an easy answer to this so reluctant to work round it. My select box: <%= form.select( :data, { "Yes" => "1", "No" => "0"},{:prompt => "– Select –"}) %> The problem is the data is ordered alphabetically so the drop down gives the options no, yes: