similar to: Can not create model instance via params on specific model but can on others....

Displaying 20 results from an estimated 1000 matches similar to: "Can not create model instance via params on specific model but can on others...."

2017 Sep 04
1
Dataframe Manipulation
Hello Ulrik, Can you please explain this code means how and what this code is doing because I'm not able to understand it, if you can explain it i can use it in future by doing some Lil bit manipulation. Thanks data_help <- data_help %>% mutate(Purchase_ID = 1:n()) %>% group_by(Purchase_ID) %>% do(split_items(.)) cat_help %>% gather("Foo",
2017 Aug 31
0
Dataframe Manipulation
Hi Hemant, the solution is really quite similar, and the logic is identical: library(readr) library(dplyr) library(stringr) library(tidyr) data_help <- read_csv("data_help.csv") cat_help <- read_csv("cat_help.csv") # Helper function to split the Items and create a data_frame split_items <- function(items){ x <- items$Items_purchased_on_Receipts %>%
2005 Mar 10
2
NoMethodError in Event_type#create
I am new Ruby on Rails, so excuse me if my question seems pretty obvious. I am trying to validate uniqueness of a filed: class EventType < ActiveRecord::Base belongs_to :sport validates_uniqueness_of :event_type end When I run it, I get this error message: Showing /event_type/new.rhtml where line #27 raised undefined method `each'' for nil:NilClass <select
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
The problem: users trying to debug Mechanize apps with Komodo are finding the debugger times out once it''s loaded a web page. They don''t run into this in the ruby-debug debugger, or running in normal mode. The reason: Komodo''s debugger is graphical, which means that whenever it hits a breakpoint it automatically shows the contents of each local variable. It has a
2010 Dec 05
3
Strange problem with CSV and funny chars
I am using CSV in a rake task (db:seed) on Rails 3.0.3, Ruby 1.9.2 to read a file with some funny chars in it. Upon breaking in at a point where the row read using CSV is in variable row, with the string with the char in row[''price''] I get the following strange results which I cannot understand. (rdb:1) row[''price''] "\xA32.00" (rdb:1)
2009 Jun 21
1
cannot do mass_assignment when inherited class ?
I got the following error when trying to create the elibrary instance (rdb:21) @elibrary = Elibrary.new(params[:elibrary]) RuntimeError Exception: Declare either attr_protected or attr_accessible for Elibrary, but not both. params : "elibrary"=>{"title"=>"bingo three", "short_description"=>"something new",
2007 Apr 19
2
invalid geometry string in change_geometry
I get the following error at the browser: ArgumentError in ImagesController#upload invalid geometry string `110×'' ... for the call to change_geometry with an explicit size (''110x'') as the geometry string: def make_thumb (the_img) require ''RMagick'' size = "110x" debugger if ENV[''RAILS_ENV''] ==
2010 Jun 21
1
Problem with package installation
Dear ComRades, I am having the "wrong MD5 checksums" error with every package I try to install. It happened with R 2.11.0, then I updated to R 2.11.1, same thing. sessionInfo() R version 2.11.1 (2010-05-31) i386-pc-mingw32 locale: [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252 LC_MONETARY=Spanish_Spain.1252 [4] LC_NUMERIC=C
2006 Mar 16
1
Problem compiling R-Patched
I downloaded R-Patched today (to see if another problem I want to ask about is still present or if its just me - as per the posting guide). I ran "tools/rsync-recommended" successfully. I then ran "configure --enable-R-shlib" successfully. Then make stops with the following error. gcc -shared -L/usr/local/lib -o tools.so text.o init.o Rmd5.o md5.o -L../../../../lib -lR
2015 Nov 23
4
compile question
> On 23 Nov 2015, at 22:30 , aixtools <aixtools at gmail.com> wrote: > >> >> ./configure --enable-maintainer-mode ... Two things here - possibly irrelevant, but I'd avoid building in the source directory. (mkdir ../BUILD ; cd ../BUILD; ../R/configure) - don't turn on mantainer mode. You are not a maintainer, and if you want to play at being one, I think you
2005 Oct 30
1
attaching the debugger to functional test.
People, I''m trying to run the ruby debugger against a Test::Unit::TestCase class which is a parent of a Rails class. I started my study with a simple script: # # bikle_test.rb # require ''test/unit'' class BikleTest < Test::Unit::TestCase def setup @string10 = "hello" end def test10 assert_equal @string10, "hello" end end The
2009 Jun 13
2
removing Mocha; 'spec spec' fails but the specific model file passes
I happened to mix ryan bates'' authentication scaffold with rspec_scaffold on a demo project. and ran into the problem of mixing mock frameworks...ryan uses mocha. So, as a learning experience, I choose to redo ryan''s tests without mocha but ran into a strange problem with tests of the User model. With debugging you can see.... If you run just the user_spec.rb file, everything
2012 Aug 02
3
INDEX rdb and rdx files
Greetings, My computer has these OS: 64-bit blfs linux R2.15.1 If one has downloaded a tarball for example MASS.tar.ga and unzip it Are there R commands to generate the following?:- a) the INDEX file b) 'R' files such as MASS.rdb and MASS.rdx advice would be appreciated sincerely luxInteg
2012 Nov 02
1
[Rails 3.2.8] issue in regex scan
running a scan in irb is fine : 1.9.3p194 :001 > request_url = "http://lvh.me::3000/en/backoffice/cms-admin/site/6/pages" => "http://lvh.me::3000/en/backoffice/cms-admin/site/6/pages" request_url.scan(/^([\S]+)(backoffice\/cms-admin\/site\/)(\d+)(\/pages)$/)[0][2] => "6" however running it in my controller doesn''t gives any result : (rdb:1)
2007 Jun 13
2
Design library installation problem
Dear Listers I have tried to install Frank Harrell's two libaries: Hmisc and Design. I found that Hmisc was listed in the list of packages from the Install Packages command on the Packages menu, but Design was not. I installed Hmisc from this list, and when I issued the library(Hmisc) command, it loaded into memory correctly. I then copied the Design 1.1-1.zip file from the
2011 Apr 06
1
executing from .R source file in the src package
Can I run R code straight from R src (.R) file instead of .rdb/.rdx? I of course tried simply unzipping tar.gz in the R_LIBS directory but R complains with "not a valid installed package". Real issue: I am very new to R and all, so this could be something basic. I'm trying to use ess-tracebug (Emacs front-end to trace/browser et al). It works great when I trace functions in .R
2010 Aug 19
7
External CA: Could not run: Could not retrieve certificate for puppetsrv and not running on a valid certificate authority
Hi Experts, I''m trying to generate my own certificates (all of them, including certs for CA, server and client) for puppet to use. and I''m getting "Could not run: Could not retrieve certificate for puppetsrv and not running on a valid certificate authority" Just wondering what the problem could be? What I did is: 1. generate a self signed CA cert, and save the
2017 Aug 30
1
Dataframe Manipulation
by using these two tables we have to create third table in this format where categories will be on the top and transaction will be in the rows, On 30 August 2017 at 16:42, Hemant Sain <hemantsain55 at gmail.com> wrote: > Hello Ulrik, > Can you please once check this code again on the following data set > because it doesn't giving same output to me due to absence of quantity,a
2012 Aug 16
1
Compressing data for package builds
Hi, I have two .rda files that I need to include in a package. I've placed them both in a data directory after save() the are around 150Kb each. When I try to check the package I get the following warning Warning: large data file(s) saved inefficiently: size ASCII compress zagoskin.rda 137Kb FALSE none Note: significantly better compression could be obtained
2005 Jul 21
2
opening RDB files
Hi all, I've recently upgraded to R version 2.1.1 and when trying to inspect the contents of many packages in the library (for instance library\MASS\R) I've realized wordpad, or the notepad, won't open them since they have *.RDB and *.RDX extensions which these editors cannot recognize. However, libraries in previous versions of R did not have these extensions and I could inspect