Search Results

Search found 2028 results on 82 pages for 'constant'.

Page 7/82 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Deciphering a queer compiler warning about unsigned decimal constant

    - by Artagnon
    This large application has a memory pool library which uses a treap internally to store nodes of memory. The treap is implemented using cpp macros, and the complete file trp.h can be found here. I get the following compiler warning when I attempt to compile the application: warning: this decimal constant is unsigned only in ISO C90 By deleting portions of the macro code and using trial-and-error, I finally found the culprit: #define trp_prio_get(a_type, a_field, a_node) \ (2654435761*(uint32_t)(uintptr_t)(a_node)) I'm not sure what that strange number is doing there, but I assume it's there for a good reason, so I just want to leave it alone. I do want to fix the warning though- any idea why the compiler's saying that it's unsigned only in ISO C90? EDIT: I'm using gcc-4.1

    Read the article

  • Constant in Hibernate Mapping Files

    - by bertolami
    I would like to add a value object to a mapped class where one column is fixed depending of the class that contains the component. How can I do something like this? <component name="aComponent"> <property name="abc" column="cde"/> <property name="xyz" value="FIXED"/> </component> Unfortunatly, the value attribute does not exist. Is there another way to apply a constant value to property? Thanks in advance.

    Read the article

  • matlab constant anonymous function returns only one value instead of an array

    - by Filo
    I've been searching the net for a couple of mornings and found nothing, hope you can help. I have an anonymous function like this f = @(x,y) [sin(2*pi*x).*cos(2*pi*y), cos(2*pi*x).*sin(2*pi*y)]; that needs to be evaluated on an array of points, something like x = 0:0.1:1; y = 0:0.1:1; w = f(x',y'); Now, in the above example everything works fine, the result w is a 11x2 matrix with in each row the correct value f(x(i), y(i)). The problem comes when I change my function to have constant values: f = @(x,y) [0, 1]; Now, even with array inputs like before, I only get out a 1x2 array like w = [0,1]; while of course I want to have the same structure as before, i.e. a 11x2 matrix. I have no idea why Matlab is doing this...

    Read the article

  • storing an integer constant other than zero in a pointer variable

    - by benjamin button
    int main() { int *d=0; printf("%d\n",*d); return 0; } this works fine. >cc legal.c > ./a.out 0 if i change the statement int *d=0; to int *d=1; i see the error. cc: "legal.c", line 6: error 1522: Cannot initialize a pointer with an integer constant other than zero. so its obvious that it will allow only zero.i want to know what happens inside the memory when we do this int *d=0 which is making it valid syntax. I am just asking this out of curiosity!

    Read the article

  • `.' cannot appear in a constant-expression

    - by Amir Rachum
    Hi all, I'm getting the following error: `.' cannot appear in a constant-expression for this function (line 4): bool Covers(const Region<C,V,D>& other) const { const Region& me = *this; for (unsigned d = 0; d < D; d++) { if (me[d].min > other[d].min || me[d].max < other[d].max) { return false; } } can anyone explain the problem please?

    Read the article

  • C++ constant reference lifetime

    - by aaa
    hello I have code that looks like this: class T {}; class container { const T &first, T &second; container(const T&first, const T & second); }; class adapter : T {}; container(adapter(), adapter()); I thought lifetime of constant reference would be lifetime of container. However, it appears otherwise, adapter object is destroyed after container is created, leading dangling reference. What is the correct lifetime? how to correctly implement binding temporary object to class member reference? Thanks

    Read the article

  • In Ruby, is there are better way of selecting a constant (or avoiding the constant altogether) based

    - by Vertis
    Not sure the title fully describes the problem/question I'm trying to ask, sorry. I'm One of my fellow developers has created classes as such: class Widget attr_accessor :model_type ... end and: class ModelType MODEL1 = "model1" MODEL2 = "model2" MODEL3 = "model3" end Now he wants me to convert a retrieved string "MODEL1" to the constant. So that when he is referencing that model elsewhere he can use ModelType::MODEL1. Obviously I've got to convert from the string I'm being given with something like the following: case model_type when 'MODEL1' @model_type = ModelType::MODEL1 ... end I feel like this is clunky, so I'd like to know if there is a better DRYer way of providing this kind of functionality.

    Read the article

  • In Ruby, is there a better way of selecting a constant (or avoiding the constant altogether) based o

    - by Vertis
    Not sure the title fully describes the problem/question I'm trying to ask, sorry. One of my fellow developers has created classes as such: class Widget attr_accessor :model_type ... end and: class ModelType MODEL1 = "model1" MODEL2 = "model2" MODEL3 = "model3" end Now he wants me to convert a retrieved string "MODEL1" to the constant. So that when he is referencing that model elsewhere he can use ModelType::MODEL1. Obviously I've got to convert from the string I'm being given with something like the following: case model_type when 'MODEL1' @model_type = ModelType::MODEL1 ... end I feel like this is clunky, so I'd like to know if there is a better DRYer way of providing this kind of functionality.

    Read the article

  • Constant Assigment Bug in Ruby?

    - by aronchick
    We caught some code in Ruby that seems odd, and I was wondering if someone could explain it: $ irb irb(main):001:0> APPLE = 'aaa' => "aaa" irb(main):002:0> banana = APPLE => "aaa" irb(main):003:0> banana << 'bbb' => "aaabbb" irb(main):004:0> banana => "aaabbb" irb(main):005:0> APPLE => "aaabbb" Catch that? The constant was appended to at the same time the local variable was. Known behavior? Expected?

    Read the article

  • Constant embedded for loop condition optimization in C++ with gcc

    - by solinent
    Will a compiler optimize tihs: bool someCondition = someVeryTimeConsumingTask(/* ... */); for (int i=0; i<HUGE_INNER_LOOP; ++i) { if (someCondition) doCondition(i); else bacon(i); } into: bool someCondition = someVeryTimeConsumingTask(/* ... */); if (someCondition) for (int i=0; i<HUGE_INNER_LOOP; ++i) doCondition(i); else for (int i=0; i<HUGE_INNER_LOOP; ++i) bacon(i); someCondition is trivially constant within the for loop. This may seem obvious and that I should do this myself, but if you have more than one condition then you are dealing with permuatations of for loops, so the code would get quite a bit longer. I am deciding on whether to do it (I am already optimizing) or whether it will be a waste of my time.

    Read the article

  • Access static constant variable from multiple threads in C

    - by user325519
    I have some experience with multithread programming under Linux (C/C++ & POSIX threads), however most obvious cases are sometimes very complicated. I have several static constant variables (global and function local) in my code, can I access them simultaneously from multiple threads without using mutexes? Because I don't modify them it should be ok, but it's always better to ask. I have to do heavy speed optimization, so even as fast operations as mutex lock/unlock are quite expensive for me, especially because my application is going to access these variables form long loops.

    Read the article

  • Why does a non-constant offsetof expression work?

    - by Chris J. Kiick
    Why does this work: #include <sys/types.h> #include <stdio.h> #include <stddef.h> typedef struct x { int a; int b[128]; } x_t; int function(int i) { size_t a; a = offsetof(x_t, b[i]); return a; } int main(int argc, char **argv) { printf("%d\n", function(atoi(argv[1]))); } If I remember the definition of offsetof correctly, it's a compile time construct. Using 'i' as the array index results in a non-constant expression. I don't understand how the compiler can evaluate the expression at compile time. Why isn't this flagged as an error?

    Read the article

  • scrollTop issue on constant moving div

    - by joe
    I have a FLASH object that I mouse over which in turn calls the following function to scroll a div. It works but due to the constant high speed scrolling it would throw up NULLS. This in turn caused IE to open a new page through my FLASH ActionScript 2.0 I found that by creating the SC variable and throwing in the condition "if it exists" keeps FLASH from causing IE to open a new page. However, it still creates an error behind the scenes of "Object Required". Although my application works I do not want load up memory with errors. Any thoughts? var SC; function pP(PT){ SC=document.getElementById('P'+PT).offsetTop; if(SC){document.getElementById('CBOX').scrollTop=SC;} }

    Read the article

  • how can I get around no arrays as class constants in php?

    - by user151841
    I have a class with a static method. There is an array to check that a string argument passed is a member of a set. But, with the static method, I can't reference the class property in an uninstantiated class, nor can I have an array as a class constant. I suppose I could hard code the array in the static method, but then if I need to change it, I'd have to remember to change it in two places. I'd like to avoid this.

    Read the article

  • Generating %pc relative address of constant data

    - by Hudson
    Is there a way to have gcc generate %pc relative addresses of constants? Even when the string appears in the text segment, arm-elf-gcc will generate a constant pointer to the data, load the address of the pointer via a %pc relative address and then dereference it. For a variety of reasons, I need to skip the middle step. As an example, this simple function: const char * filename(void) { static const char _filename[] __attribute__((section(".text"))) = "logfile"; return _filename; } generates (when compiled with arm-elf-gcc-4.3.2 -nostdlib -c -O3 -W -Wall logfile.c): 00000000 <filename>: 0: e59f0000 ldr r0, [pc, #0] ; 8 <filename+0x8> 4: e12fff1e bx lr 8: 0000000c .word 0x0000000c 0000000c <_filename.1175>: c: 66676f6c .word 0x66676f6c 10: 00656c69 .word 0x00656c69 I would have expected it to generate something more like: filename: add r0, pc, #0 bx lr _filename.1175: .ascii "logfile\000" The code in question needs to be partially position independent since it will be relocated in memory at load time, but also integrate with code that was not compiled -fPIC, so there is no global offset table. My current work around is to call a non-inline function (which will be done via a %pc relative address) to find the offset from the compiled location in a technique similar to how -fPIC code works: static intptr_t __attribute__((noinline)) find_offset( void ) { uintptr_t pc; asm __volatile__ ( "mov %0, %%pc" : "=&r"(pc) ); return pc - 8 - (uintptr_t) find_offset; } But this technique requires that all data references be fixed up manually, so the filename() function in the above example would become: const char * filename(void) { static const char _filename[] __attribute__((section(".text"))) = "logfile"; return _filename + find_offset(); }

    Read the article

  • Javassist failure in hibernate: invalid constant type: 60

    - by Kaleb Pederson
    I'm creating a cli tool to manage an existing application. Both the application and the tests build fine and run fine but despite that I receive a javassist failure when running my cli tool that exists within the jar: INFO: Bytecode provider name : javassist ... INFO: Hibernate EntityManager 3.5.1-Final Exception in thread "main" javax.persistence.PersistenceException: Unable to configure EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:371) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32) ... at com.sophware.flexipol.admin.AdminTool.<init>(AdminTool.java:40) at com.sophware.flexipol.admin.AdminTool.main(AdminTool.java:69) Caused by: java.lang.RuntimeException: Error while reading file:flexipol-jar-with-dependencies.jar at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:131) at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:467) at org.hibernate.ejb.Ejb3Configuration.addMetadataFromScan(Ejb3Configuration.java:457) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:347) ... 11 more Caused by: java.io.IOException: invalid constant type: 60 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1027) at javassist.bytecode.ConstPool.read(ConstPool.java:970) at javassist.bytecode.ConstPool.<init>(ConstPool.java:127) at javassist.bytecode.ClassFile.read(ClassFile.java:693) at javassist.bytecode.ClassFile.<init>(ClassFile.java:85) at org.hibernate.ejb.packaging.AbstractJarVisitor.checkAnnotationMatching(AbstractJarVisitor.java:243) at org.hibernate.ejb.packaging.AbstractJarVisitor.executeJavaElementFilter(AbstractJarVisitor.java:209) at org.hibernate.ejb.packaging.AbstractJarVisitor.addElement(AbstractJarVisitor.java:170) at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:119) at org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:146) at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:128) ... 14 more Since I know the jar is fine as the unit and integration tests run against it, I thought it might be a problem with javassist, so I tried cglib. The bytecode provider then shows as cglib but I still get the exact same stack trace with javassist present in it. cglib is definitely in the classpath: $ unzip -l flexipol-jar-with-dependencies.jar | grep cglib | wc -l 383 I've tried with both hibernate 3.4 and 3.5 and get the exact same error. Is this a problem with javassist?

    Read the article

  • NAMESPACE_SEPARATOR constant

    - by ts
    Hello, Having namespaces in PHP is great. Having '\' as namespace separator is a little bit ... awkward (but if there is someone who thinks that is cool & sexy, I am adding tag "rant" to this post. ;) . So, here goes the question: Are you using in your code NAMESPACE_SEPARATOR constant? As in code below: <?php if (!\defined('NAMESPACE_SEPARATOR') { \define('NAMESPACE_SEPARATOR', '\\'); } // if Pros: consistent with DIRECTORY_SEPARATOR (which all of us are using ;) no mess with escaping (think of '\Foo\Bar' but '\\' . Foo' . '\\' . 'Bar') more readable (IMHO) which gives us in effect an opportunity to write good, namespace-aware autoloaders can resist another change if something scary happens (as with ol'good '::' from PHP 6 alpha) can hide uniquess of '\' as namespace operator in programming language land from strangers ;) Cons: "The reason for DIRECTORY_SEPARATOR is that the value is platform dependent, the namespace separator isn't." (as stated in http://bugs.php.net/bug.php?id=43046) 19 characters instead of 1 ( \ ) or 4 ('\\') There are places where you can't use this (full qualified class names as default class variables) ie: class A { protected $sDefaultReporterClass = '\My\Namespace\DefaultReporter'; } So, what are you thinking ?

    Read the article

  • Ninject problem binding to constant value in MVC3 with a RavenDB session

    - by Jim
    I've seen a lot of different ways of configuring Ninject with ASP.NET MVC, but the implementation seems to change slightly with each release of the MVC framework. I'm trying to inject a RavenDB session into my repository. Here is what I have that's almost working. public class MvcApplication : NinjectHttpApplication { ... protected override void OnApplicationStarted() { base.OnApplicationStarted(); AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); } protected override IKernel CreateKernel() { return new StandardKernel(new MyNinjectModule()); } public static IDocumentSession CurrentSession { get { return (IDocumentSession)HttpContext.Current.Items[RavenSessionKey]; } } ... } public class MyNinjectModule : NinjectModule { public override void Load() { Bind<IUserRepository>().To<UserRepository>(); Bind<IDocumentSession>().ToConstant(MvcApplication.CurrentSession); } } When it tries to resolve IDocumentSession, I get the following error. Error activating IDocumentSession using binding from IDocumentSession to constant value Provider returned null. Activation path: 3) Injection of dependency IDocumentSession into parameter documentSession of constructor of type UserRepository Any ideas on how to make the IDocumentSession resolve?

    Read the article

  • error: expected ',' or '...' before numeric constant

    - by goldfrapp04
    Just a Qt Gui Application with QDialog as the Base Class, the simplest type you can expect. I've programmed on Qt for several times but this is the first time I meet this problem... I've added minimal code to the program, and here's the code in dialog.h (which is mostly automatically generated) #ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include <QPixmap> #include "bmp.h" namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: explicit Dialog(QWidget *parent = 0); ~Dialog(); private slots: void on_openButton_clicked(); private: Ui::Dialog *ui; BMP srcImage; QImage compressedImage[3]; }; #endif // DIALOG_H While I edit, the "public:" is underlined and says "unexpected token '('". When I try to build the program, it says in the line "Q_OBJECT", "error: expected ',' or '...' before numeric constant". I'm sure I've defined nothing related to it (to be exact, I defined an N and an n in file bmp.h, both are int). Any idea of what's wrong here? Thanks.

    Read the article

  • C++ : integer constant is too large for its type

    - by user38586
    I need to bruteforce a year for an exercise. The compiler keep throwing this error: bruteforceJS12.cpp:8:28: warning: integer constant is too large for its type [enabled by default] My code is: #include <iostream> using namespace std; int main(){ unsigned long long year(0); unsigned long long result(318338237039211050000); unsigned long long pass(1337); while (pass != result) { for (unsigned long long i = 1; i<= year; i++) { pass += year * i * year; } cout << "pass not cracked with year = " << year << endl; ++year; } cout << "pass cracked with year = " << year << endl; } Note that I already tried with unsigned long long result(318338237039211050000ULL); I'm using gcc version 4.8.1 EDIT: Here is the corrected version using InfInt library http://code.google.com/p/infint/ #include <iostream> #include "InfInt.h" using namespace std; int main(){ InfInt year = "113"; InfInt result = "318338237039211050000"; InfInt pass= "1337"; while (pass != result) { for (InfInt i = 1; i<= year; i++) { pass += year * i * year; } cout << "year = " << year << " pass = " << pass << endl; ++year; } cout << "pass cracked with year = " << year << endl; }

    Read the article

  • c++ expected constant expression

    - by cpp
    #include <iostream> #include <fstream> #include <cmath> #include <math.h> #include <iomanip> using std::ifstream; using namespace std; int main (void) { int count=0; float sum=0; float maximum=-1000000; float sumOfX; float sumOfY; int size; int negativeY=0; int positiveX=0; int negativeX=0; ifstream points; //the points to be imported from file //points.open( "data.dat"); //points>>size; //cout<<size<<endl; size=100; float x[size][2]; while (count<size) { points>>(x[count][0]); //cout<<"x= "<<(x[count][0])<<" ";//read in x value points>>(x[count][1]); //cout<<"y= "<<(x[count][1])<<endl;//read in y value count++; } This program is giving me expected constant expression error on the line where I declare float x[size][2]. why?

    Read the article

  • Error "initializer element is not constant" when trying to initialize variable with const

    - by tomlogic
    I get an error on line 6 (initialize my_foo to foo_init) of the following program and I'm not sure I understand why. typedef struct foo_t { int a, b, c; } foo_t; const foo_t foo_init = { 1, 2, 3 }; foo_t my_foo = foo_init; int main() { return 0; } Keep in mind this is a simplified version of a larger, multi-file project I'm working on. The goal was to have a single constant in the object file, that multiple files could use to initialize a state structure. Since it's an embedded target with limited resources and the struct isn't that small, I don't want multiple copies of the source. I'd prefer not to use: #define foo_init { 1, 2, 3 } I'm also trying to write portable code, so I need a solution that's valid C89 or C99. Does this have to do with the ORGs in an object file? That initialized variables go into one ORG and are initialized by copying the contents of a second ORG? Maybe I'll just need to change my tactic, and have an initializing function do all of the copies at startup. Unless there are other ideas out there?

    Read the article

  • uninitialized constant Active Scaffold rails 2.3.5

    - by Kiva
    Hi guy, I update my rails application 2.0.2 to 2.3.5. I use active scaffold for the administration part. I change nothing in my code but a problem is coming with the update. I have a controller 'admin/user_controller' to manage users. Here is the code of the controller: class Admin::UserController < ApplicationController layout 'admin' active_scaffold :user do |config| config.columns.exclude :content, :historique_content, :user_has_objet, :user_has_arme, :user_has_entrainement, :user_has_mission, :mp, :pvp, :user_salt, :tchat, :notoriete_by_pvp, :invitation config.list.columns = [:user_login, :user_niveau, :user_mail, :user_bloc, :user_valide, :group_id] #:user_description, :race, :group, :user_lastvisited, :user_nextaction, :user_combats_gagner, :user_combats_perdu, :user_combats_nul, :user_password, :user_salt, :user_combats, :user_experience, :user_mana, :user_vie config.create.link.page = true config.update.link.page = true config.create.columns.add :password, :password_confirmation config.update.columns.add :password, :password_confirmation config.create.columns.exclude :user_password, :user_salt config.update.columns.exclude :user_password, :user_salt config.list.sorting = {:user_login => 'ASC'} config.subform.columns = [] end end This code hasn't change with the update, but when I go in this page, I got this error: uninitialized constant Users /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in `load_missing_constant' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:361:in `constantize' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `each' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `constantize' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/inflections.rb:162:in `constantize' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb:28:in `reverse_matches_for' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb:24:in `each' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb:24:in `reverse_matches_for' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb:11:in `reverse' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/column.rb:117:in `autolink?' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold.rb:107:in `links_for_associations' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/columns.rb:62:in `each' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/columns.rb:62:in `each' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold.rb:106:in `links_for_associations' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold.rb:59:in `active_scaffold' /Users/Kiva/Documents/Projet-rpg/jeu/app/controllers/admin/user_controller.rb:11 I search since 2 days but I don't find the problem, can you help me please.

    Read the article

  • uninitialized constant Active Scaffold rails 2.3.5

    - by Kiva
    Hi guy, I update my rails application 2.0.2 to 2.3.5. I use active scaffold for the administration part. I change nothing in my code but a problem is coming with the update. I have a controller 'admin/user_controller' to manage users. Here is the code of the controller: class Admin::UserController < ApplicationController layout 'admin' active_scaffold :user do |config| config.columns.exclude :content, :historique_content, :user_has_objet, :user_has_arme, :user_has_entrainement, :user_has_mission, :mp, :pvp, :user_salt, :tchat, :notoriete_by_pvp, :invitation config.list.columns = [:user_login, :user_niveau, :user_mail, :user_bloc, :user_valide, :group_id] #:user_description, :race, :group, :user_lastvisited, :user_nextaction, :user_combats_gagner, :user_combats_perdu, :user_combats_nul, :user_password, :user_salt, :user_combats, :user_experience, :user_mana, :user_vie config.create.link.page = true config.update.link.page = true config.create.columns.add :password, :password_confirmation config.update.columns.add :password, :password_confirmation config.create.columns.exclude :user_password, :user_salt config.update.columns.exclude :user_password, :user_salt config.list.sorting = {:user_login => 'ASC'} config.subform.columns = [] end end This code hasn't change with the update, but when I go in this page, I got this error: uninitialized constant Users /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in `load_missing_constant' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:361:in `constantize' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `each' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `constantize' /Users/Kiva/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/inflections.rb:162:in `constantize' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb:28:in `reverse_matches_for' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb:24:in `each' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb:24:in `reverse_matches_for' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb:11:in `reverse' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/column.rb:117:in `autolink?' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold.rb:107:in `links_for_associations' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/columns.rb:62:in `each' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/columns.rb:62:in `each' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold.rb:106:in `links_for_associations' /Users/Kiva/Documents/Projet-rpg/jeu/vendor/plugins/active_scaffold/lib/active_scaffold.rb:59:in `active_scaffold' /Users/Kiva/Documents/Projet-rpg/jeu/app/controllers/admin/user_controller.rb:11 I search since 2 days but I don't find the problem, can you help me please.

    Read the article

  • uninitialized constant Encoding rake db:migrate

    - by Denis
    Hi, My RoR App use rails 2.1.2 When I run rake db:migrate --trace I get the following error, Any idea? ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! uninitialized constant Encoding /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activesupport/lib/active_support/dependencies.rb:278:in `load_missing_constant' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activesupport/lib/active_support/dependencies.rb:467:in `const_missing' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activesupport/lib/active_support/dependencies.rb:479:in `const_missing' /Library/Ruby/Gems/1.8/gems/sqlite3-0.0.8/lib/sqlite3/encoding.rb:9:in `find' /Library/Ruby/Gems/1.8/gems/sqlite3-0.0.8/lib/sqlite3/database.rb:66:in `initialize' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `new' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `sqlite3_connection' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in `send' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in `connection=' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:260:in `retrieve_connection' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/migration.rb:408:in `initialize' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/migration.rb:373:in `new' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/migration.rb:373:in `up' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/migration.rb:356:in `migrate' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/railties/lib/tasks/databases.rake:99 /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 My database.yml development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 thanks

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >