Home > The Error > The Error Occurred While Evaluating Nil.inject

The Error Occurred While Evaluating Nil.inject

Will cream2 be still integration of Cancan, Devise, and Roles, or a complete rewrite of those too? Before I leave my company, should I delete software I wrote during my free time? Terms Privacy Security Status Help You can't perform that action at this time. Report post Edit Delete Reply with quote Re: Re: validates_presence_of problem Colin Law (Guest) on 2011-01-21 22:42 On 21 January 2011 21:22, abdelkarim wrote: > hello thank you for your weblink

My class is pretty basic: class LocalAsset < AttachableAsset require 'fileutils' has_attached_file :file, :path => ":rails_root/products/:id_partition/:basename.:extension", :url => "/products/:id/:basename.:extension" ... You should update your code to have that, or use Paperclip::Attachment.default_options.merge({ ... this is the error : You have a nil object when you didn't expect it! nir0 commented Sep 23, 2011 i got an initializer: Paperclip.interpolates :thousand do |attachment, style| (attachment.instance.id.to_f/1000).floor end module Paperclip # The Attachment class manages the files for a given attachment.

Browse other questions tagged ruby-on-rails validation or ask your own question. Posts [ 4 ] Pages 1 Rails Forum - Ruby on Rails Help and Discussion Forum 損Models and Database 損rake aborted! On what line?

In a controller I have this code in a "new" method: @directories = Directory.find(:all, :conditions => {:id => session[:directories_with_view_access]}) @directories.collect! {|u| [u.name, u.id]} Inside a partial for the "new" view, I Debugging this is a simple case of first checking to ensure that your form and the data in it are correct and then that the params being sent to your controller The other (either create or update) does the creation or update of the model. If you stick to the rails conventions your life will generally be simpler.

Thanks Phil, I really should change my name to railsnewb9999 –gcahill Nov 25 '09 at 10:03 add a comment| up vote 1 down vote In your new method, how are you your hash ...}) instead. Does it occur in the controller, view, or model? Existing account User name or e-mail address Password Always use SSL (experimental!) NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account?

Linked 9 Undefined method 'map' for nil:NilClass Related 1801Validate decimal numbers in JavaScript - IsNumeric()2098Validate email address in JavaScript?6Rails validation and 'fieldWithErrors' wrapping select tags1Errors deleted in validation with valid? BTW. Browse other questions tagged ruby-on-rails or ask your own question. Is Certificate validation done completely local?

Hosting provided by aTech Media Ruby-Forum.com Ruby Ruby Ruby on Rails JRuby Ruby Jobs About this forum Ruby-Forum Non-English Italian Ruby Group Forum: Ruby on Rails validates_presence_of problem Forum List Topic check it out i created one model called team so a migration is created and i edited the migration like thisclass CreateTeams < ActiveRecord::Migration def self.up create_table :teams do |t| t.string netizer commented Feb 22, 2011 For me it looks like something is wrong with your environment (I don't know, maybe it's conflict between two versions of rubygems). You might have expected an instance of Array.

Solutions? have a peek at these guys Given that ice is less dense than water, why doesn't it sit completely atop water (rather than slightly submerged)? Hello, Can you try again with the --trace option:rake db:migrate --traceand paste here the result you get. 3 Reply by muxstudycentre1 2010-09-25 09:44:28 muxstudycentre1 Registered: 2010-09-16 Posts: 2 Re: rake aborted! In it, you'll get: The week's top questions and answers Important community announcements Questions that need answers see an example newsletter By subscribing, you agree to the privacy policy and terms

So we introduced another key in the hash called :source_file_options, which defaults to a {}. I tried adding source_file_options => {} with no luck (I didn't expect much luck since that doesn't seem like it should be necessary) Thanks! I've also tried removing ruby 1.9.2 and reinstall it via rvm. check over here You might have expected an instance of Array.

Reload to refresh your session. ブログトップ 記事一覧 ログイン 無料ブログ開設 satake7’s memo <[Ruby][Rails]to_int に気をつけ...|[Rails][Ruby]RubyとERBのコメン...> 2008-05-27 Rails初心者Tips Railsのエラー Rails 喉元過ぎれば熱さ忘れるということもあり、あとで同じようなことが起きたときに「あれ、なんだっけ?」とならないようにメモ。エラーメッセージをググって探しにくる人のためになればなおよろし。 NoMethodError (undefined method `params?' for #): ItemsController には `params?' というようなメソッドはないということで、そのまんまの意味。 メソッド名の綴りが間違ってる。他を疑う前にまず自分を疑うこと。 module のメソッドの場合、module_function share|improve this answer answered Nov 24 '09 at 23:23 Chris Johnston 1,6511015 My validation code is just one line in town.rb "validates_presence_of :name". You might have expected an instance of Array.

Reload to refresh your session.

Your create or update action will also need to assign @counties when save fails so that it is available in the view. I suspect that the issue might be in your view code?? You have a nil object when you didn't expect it! Already have an account?

Reading up on RESTful routes is essential if you're using traditional Rails architecture, such as gets built for you by the scripts in script/generate. Building YARD (yri) index for rubygems-update-1.5.2... Log in with Google account | Log in with Yahoo account | Log in with Facebook account No account? this content Installing RDoc documentation for rubygems-update-1.5.2...

You might have expected an instance of Array. Sign up for free to join this conversation on GitHub. Owner grosser commented Jun 24, 2015 I can offer a fun learning experience where you open a PR and fix it ;) Sign up for free to join this conversation I expect your new or edit action has some code that assigns to @counties.

You signed out in another tab or window. Personal Open source Business Explore Sign up Sign in Pricing Blog Support Search GitHub This repository Watch 1 Star 21 Fork 1 kristianmandrup/cancan-permits Code Issues 2 Pull requests 0 Projects Addison-Wesley Professional Obed (Obie) Fernandez Kevin Faustino RACK-13係の残酷器械- (KADOKAWA) コミック 1-6... Show us the code that you use to create it?

Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Output a googol copies of a string YouTube Videos: Google returns non-existant meta description and different keywords Is the Rice Theorem applicable for these problems? Hopefully then I can continue on Cream development... anyhow more info should help.

Personal Open source Business Explore Sign up Sign in Pricing Blog Support Search GitHub This repository Watch 41 Star 1,879 Fork 352 grosser/parallel_tests Code Issues 64 Pull requests 3 Projects The error occurred while evaluating nil.[] paperclip (2.4.1) lib/paperclip/attachment.rb:369:in `extra_source_file_options_for' paperclip (2.4.1) lib/paperclip/style.rb:53:in `source_file_options' paperclip (2.4.1) lib/paperclip/style.rb:71:in `block in processor_options' paperclip (2.4.1) lib/paperclip/style.rb:70:in `each' paperclip (2.4.1) lib/paperclip/style.rb:70:in `processor_options' paperclip (2.4.1) lib/paperclip/attachment.rb:392:in i have a little problem i have created a scaffold Zone witch contain : name , interface and description as attribute all works fine but when i add this line to Why do (some) aircrafts shake at low speeds with flaps, slats extended?