Search Results

Search found 9853 results on 395 pages for 'ruby datamapper'.

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

  • CodeIgniter & Datamapper as frontend, Django Admin as backend, database tables inconsistent

    - by Rasiel
    I created a database for a site i'm doing using Django as the admin backend. However because the server where the site is hosted on, won't be able to support Python, I find myself needing to do the front end in PHP and as such i've decided to use CodeIgniter along with Datamapper to map the models/relationship. However DataMapper requires the tables to be in a specific format for it to work, and Django maps its tables differently, using the App name as the prefix in the table. I've tried using the prefix & join_prefix vars in datamapper but still doesn't map them correctly. Has anyone used a combination of this? and if so how have the fixed the issue of db table names being inconsistent? Is there anything out there that i can use to make them work together?

    Read the article

  • Saving a 'Date' using DataMapper on AppEngine+JRuby

    - by Ryan Montgomery
    I have a a model as follows: class Total include DataMapper::Resource property :id, Serial property :amount, Float, :default => 0.00 property :day, Date belongs_to :calendar end I am trying to select a specific Total from the data-store. class Calendar include DataMapper::Resource property :id, Serial property :name, String has n, :totals def get_total_for(date) return Total.first(:day => date, :calendar => self) end end When I call get_total_for(DateTime.now) I receive the following error on the call to the data-store. java.lang.IllegalArgumentException: day: org.jruby.RubyObject is not a supported property type. Is Date not allowed for usage in AppEngine? Is this a DataMapper issue? I have tried changing the name of the :day property to something else (hoping it was just a name conflict) but it doesn't seem to matter. Thanks for any help you can provide.

    Read the article

  • Rails Tutorial Error with gemspec for "rspec" "annotate" "spork" "ansicolor" [closed]

    - by Chris H
    I'm following the Rails Tutorial by Michael Hartl and I'm getting this error when I run. bundle exec rspec spec/requests/static_pages_spec.rb Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/annotate-2.4.1.beta1.gemspec]: invalid date format in specification: "2011-09-02 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-rspec-0.5.5.gemspec]: invalid date format in specification: "2011-11-20 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-spork-0.3.2.gemspec]: invalid date format in specification: "2011-11-18 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/spork-0.9.0.gemspec]: invalid date format in specification: "2012-01-22 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/annotate-2.4.1.beta1.gemspec]: invalid date format in specification: "2011-09-02 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-rspec-0.5.5.gemspec]: invalid date format in specification: "2011-11-20 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-spork-0.3.2.gemspec]: invalid date format in specification: "2011-11-18 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/spork-0.9.0.gemspec]: invalid date format in specification: "2012-01-22 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/annotate-2.4.1.beta1.gemspec]: invalid date format in specification: "2011-09-02 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-rspec-0.5.5.gemspec]: invalid date format in specification: "2011-11-20 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-spork-0.3.2.gemspec]: invalid date format in specification: "2011-11-18 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/spork-0.9.0.gemspec]: invalid date format in specification: "2012-01-22 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/annotate-2.4.1.beta1.gemspec]: invalid date format in specification: "2011-09-02 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-rspec-0.5.5.gemspec]: invalid date format in specification: "2011-11-20 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-spork-0.3.2.gemspec]: invalid date format in specification: "2011-11-18 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/spork-0.9.0.gemspec]: invalid date format in specification: "2012-01-22 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load': cannot load such file -- /Users/chrishuang02/Desktop/rails_projects/first_app/spec/requests/spec/requests/static_pages_spec.rb (LoadError) from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `block in load_spec_files' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `map' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load_spec_files' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:22:in `run' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in `run' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `block in autorun'

    Read the article

  • Migrate existing ROR app to GAE

    - by zengr
    I have managed to run a basic rails app1 on App Engine using: http://gist.github.com/268192 So, on my basic app2, I install CE, which works fine on local machine. (communityengine.org) But, when I follow the same steps on my actual app2, where community_engine plugin is installed and all the gems are frozen, the app engine installer script asks for to over write various files like boot.rb, routes.rb, which I don't allow. So, as expected, when I publish the rails + ce app to GAE, it's not published and it also screws the local installation of CE on app2. So, the problem is obvious, CE uses ActiveRecord, and GAE uses DataMapper. So, my question can also be rephrased as: Can we migrate an existing ROR App using Active Record to GAE which uses DataMapper? PS: This is my first project on ROR and GAE.

    Read the article

  • Should I use Ruby version 1.8.7 or 1.9.2 to start developing Rails apps?

    - by BeachRunnerJoe
    Hello. I'm diving into RoR and I see that the current version of Rails (3.0.5) works with both 1.8.7 and 1.9.2. Currently, I have both versions of Ruby installed using RVM, but I'm wondering which version I should be using as I dive into Rails and start developing apps. I suppose I'd prefer to use the newest version (1.9.2), but I don't know the technologies well enough to know pros/cons of using either. Thanks so much!

    Read the article

  • can't run cucumber scenarios due to test-unit version issue on Rails 2.3.5, Ruby 1.9.1

    - by Jeff D
    I've been trying to follow along in the RSpec book, (I'm new to all of this) and I have what appears to be some kind of versioning issue. If I try and run some simple scenarios, I get this error: can't activate test-unit (= 1.2.3, runtime) for [], already activated test-unit-2.0.7 for [] (Gem::LoadError) /Users/jeffdeville/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:230:in activate' /Users/jeffdeville/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:1056:ingem' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/rspec-1.3.0/lib/spec/interop/test.rb:4:in <top (required)>' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:inrequire' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:in require' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:inrequire' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/rspec-1.3.0/lib/spec/test/unit.rb:1:in <top (required)>' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:inrequire' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:in require' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:inrequire' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/rspec-rails-1.3.2/lib/spec/rails.rb:13:in <top (required)>' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:inrequire' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:in require' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:inrequire' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-rails-0.3.0/lib/cucumber/rails/rspec.rb:15:in rescue in <top (required)>' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-rails-0.3.0/lib/cucumber/rails/rspec.rb:3:in' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:in require' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:inrequire' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in require' /Users/jeffdeville/code/showtime/Features/support/env.rb:11:in' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:in require' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/polyglot-0.3.1/lib/polyglot.rb:64:inrequire' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-0.6.4/lib/cucumber/rb_support/rb_language.rb:124:in load_code_file' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-0.6.4/lib/cucumber/step_mother.rb:85:inload_code_file' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-0.6.4/lib/cucumber/step_mother.rb:77:in block in load_code_files' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-0.6.4/lib/cucumber/step_mother.rb:76:ineach' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-0.6.4/lib/cucumber/step_mother.rb:76:in load_code_files' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-0.6.4/lib/cucumber/cli/main.rb:48:inexecute!' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-0.6.4/lib/cucumber/cli/main.rb:20:in execute' /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378/gems/cucumber-0.6.4/bin/cucumber:8:in' script/cucumber:9:in load' script/cucumber:9:in' however, uninstalling 2.0.7 yields the error: Missing these required gems: test-unit = 2.0.7 You're running: ruby 1.9.1.378 at /Users/jeffdeville/.rvm/rubies/ruby-1.9.1-p378/bin/ruby rubygems 1.3.6 at /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378, /Users/jeffdeville/.rvm/gems/ruby-1.9.1-p378@global Run rake gems:install to install the missing gems. Sorry this is probably something easy, but I just don't know ruby or rails well enough yet.

    Read the article

  • ERROR: Failed to build gem native extension on Mavericks

    - by Kyle Decot
    I'm attempting to run bundle in my Rails project on OSX 10.9. It fails when getting to the pg gem with this error: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/kyledecot/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... yes checking for PQconnectionUsedPassword()... yes checking for PQisthreadsafe()... yes checking for PQprepare()... yes checking for PQexecParams()... yes checking for PQescapeString()... yes checking for PQescapeStringConn()... yes checking for PQescapeLiteral()... yes checking for PQescapeIdentifier()... yes checking for PQgetCancel()... yes checking for lo_create()... yes checking for pg_encoding_to_char()... yes checking for pg_char_to_encoding()... yes checking for PQsetClientEncoding()... yes checking for PQlibVersion()... yes checking for PQping()... yes checking for PQsetSingleRowMode()... yes checking for rb_encdb_alias()... yes checking for rb_enc_alias()... no checking for rb_thread_call_without_gvl()... yes checking for rb_thread_call_with_gvl()... yes checking for rb_thread_fd_select()... yes checking for rb_w32_wrap_io_handle()... no checking for PGRES_COPY_BOTH in libpq-fe.h... no checking for PGRES_SINGLE_TUPLE in libpq-fe.h... no checking for PG_DIAG_TABLE_NAME in libpq-fe.h... no checking for struct pgNotify.extra in libpq-fe.h... yes checking for unistd.h... yes checking for ruby/st.h... yes creating extconf.h creating Makefile make "DESTDIR=" compiling gvl_wrappers.c clang: warning: argument unused during compilation: '-fno-fast-math' compiling pg.c clang: warning: argument unused during compilation: '-fno-fast-math' pg.c:272:9: warning: implicit declaration of function 'PQlibVersion' is invalid in C99 [-Wimplicit-function-declaration] return INT2NUM(PQlibVersion()); ^ In file included from pg.c:48: In file included from ./pg.h:17: In file included from /Users/kyledecot/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby.h:33: /Users/kyledecot/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/ruby.h:1167:21: note: instantiated from: # define INT2NUM(v) INT2FIX((int)(v)) ^ pg.c:272:9: note: instantiated from: return INT2NUM(PQlibVersion()); ^ pg.c:272:17: note: instantiated from: return INT2NUM(PQlibVersion()); ^ pg.c:375:48: error: use of undeclared identifier 'PQPING_OK' rb_define_const(rb_mPGconstants, "PQPING_OK", INT2FIX(PQPING_OK)); ^ pg.c:375:56: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_OK", INT2FIX(PQPING_OK)); ^ pg.c:377:52: error: use of undeclared identifier 'PQPING_REJECT' rb_define_const(rb_mPGconstants, "PQPING_REJECT", INT2FIX(PQPING_REJECT)); ^ pg.c:377:60: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_REJECT", INT2FIX(PQPING_REJECT)); ^ pg.c:379:57: error: use of undeclared identifier 'PQPING_NO_RESPONSE' rb_define_const(rb_mPGconstants, "PQPING_NO_RESPONSE", INT2FIX(PQPING_NO_RESPONSE)); ^ pg.c:379:65: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_NO_RESPONSE", INT2FIX(PQPING_NO_RESPONSE)); ^ pg.c:381:56: error: use of undeclared identifier 'PQPING_NO_ATTEMPT' rb_define_const(rb_mPGconstants, "PQPING_NO_ATTEMPT", INT2FIX(PQPING_NO_ATTEMPT)); ^ pg.c:381:64: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_NO_ATTEMPT", INT2FIX(PQPING_NO_ATTEMPT)); ^ 1 warning and 4 errors generated. make: *** [pg.o] Error 1 Gem files will remain installed in /Users/kyledecot/.rvm/gems/ruby-2.0.0-p247@skateboxes/gems/pg-0.17.0 for inspection. Results logged to /Users/kyledecot/.rvm/gems/ruby-2.0.0-p247@skateboxes/gems/pg-0.17.0/ext/gem_make.out An error occurred while installing pg (0.17.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.17.0'` succeeds before bundling.

    Read the article

  • Can't install libopenssl-ruby

    - by Oetzi
    I'm trying to install ruby on rails and I can't seem to install libopenssl-ruby. I'm on a VPS and I've installed Jaunty as the newer releases don't seem to work very nicely. When I do: apt-get install libopenssl-ruby I get: E: Package libopenssl-ruby has no installation candidate Originally it simply said that it couldn't find the package but after wget'ing a deb form here: http://linuxappfinder.com/package/libopenssl-ruby and trying to install using dpkg I get this new error. Dpkg itself said that it couldn't install my deb as it depended on 'libopenssl-ruby'. Currently my sources.lst is this: ###### Ubuntu Main Repos deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse Does anyone know what might be wrong?

    Read the article

  • Passenger (mod-rails) can't find libopenssl-ruby

    - by flintinatux
    Trying to build an nginx server with Phusion Passenger on Ubuntu 11.10 (hurray for the new version!). Running "passenger-install-nginx-module" outputs the following error: * OpenSSL support for Ruby... not found With the following suggestion to fix it: * To install OpenSSL support for Ruby: Please run apt-get install libopenssl-ruby as root. Running "sudo apt-get install libopenssl-ruby" yields the following output: Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libruby' instead of 'libopenssl-ruby' libruby is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. A little research shows that libruby is a virtual package that provides libopenssl-ruby as part of the package. However, the passenger-install-nginx-module script still can't find it, and keeps throwing the same error. Help me, please! I'm in a little over my head on this one, and the google-the-error-code method that usually works is failing me today.

    Read the article

  • Installed Ruby 1.9.2 but new gems won't create scripts into /usr/bin

    - by karatedog
    I had previously ruby 1.8 on my Ubuntu 10.10, which I removed through Synaptics. Then I have installed ruby 1.9.1 also via Synaptics (which is then saying that itself is version 1.9.2). Then I installed ruby-debug19 and rspec gems with sudo gem install ruby-debug19 rspec However I can't start rdebug or rspec, but I can invoke the debugger from inside my ruby script, so the debugger is working. I inspected the starting scipts rdebug and rspec and then I realized that they are still old scripts back from ruby1.8 time. In other worlds, the current 1.9 install of these gems haven't created the starting scripts anywhere. What is the easiest solution for a lazy soul like me? It looks like removing-reinstalling ruby 1.9.2 won't help, and installing these gems over and over againg won't create the starting scripts.

    Read the article

  • Cannot install Fast debugger in Netbeans 6.8 for Ruby 1.9

    - by Bragaadeesh
    Hi, I am using Netbeans 6.8 version and Ruby 1.9.1 installed on Windows XP. I tried to install the fast debugger and I am getting the following error. Building native extensions. This could take a while... ERROR: Error installing ruby-debug-ide: ERROR: Failed to build gem native extension. D:/Ruby19/bin/ruby.exe mkrf_conf.rb Building native extensions. This could take a while... Gem files will remain installed in D:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.9 for inspection. Results logged to D:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.9/ext/gem_make.out Have someone else faced this problem before. Please help. Thanks.

    Read the article

  • How to avoid OCIError in rails application?

    - by qichunren
    OCIError (ORA-12541: TNS:no listener): oci8.c:270:in oci8lib.so /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:223:in new' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:223:innew_connection' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:328:in initialize' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:24:innew' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:24:in initialize' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:9:innew' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:9:in create' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:50:inoracle_enhanced_connection' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in send' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:inconnection=' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in retrieve_connection' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:inconnection' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1063:in table_exists?' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1153:ininspect' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/class/inheritable_attributes.rb:131:in to_proc' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:426:incollect' It seems that rails app lost oracle connection,how to avoid this in application controller: def rescue_action_in_public(exception) I use def rescue_action_in_public(exception) case exception.class.to_s when "OCIError" # my solution end It still throw me 500.html

    Read the article

  • Rails initializes extremely slow on ruby 1.9.1

    - by Ben Johnson
    I just got my rails 2.3.8 app running on ruby 1.9.1. To get into the console, start the webserver, anything that initializes rails, takes 3 - 4 times longer in ruby 1.9 than in ruby 1.8.7. I'm using ruby version managers so I can easily switch between ruby 1.9 and ruby 1.8.7. The speed difference happens in both production and development. I want to use 1.9 because its must faster once everything is running, but the startup time is so bad the app is timing out on Heroku on the first request. Any ideas why ruby 1.9 would be 3 - 4 times slower? I can't figure it out for the life of me.

    Read the article

  • Invoking active_record error - can not load file in Ruby on Rails

    - by user1623624
    When I try to run rails generate scaffold test the following error always shows C:\Lab\railapps\dbtest>rails generate scaffold test invoke active_record C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': Please install the oracle_enhanced_adapter: `gem install activerecord-oracle_enhanced-adapter` (cannot load such file -- active_record/connection_adapters/oracle_enhanced_adapter) (LoadError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'" I did install gem oci8 then activerecord-oracle-enhanced-adapter. Can you help me by having a look? Thanks a lot. Version information C:\Lab\railapps\dbtest>gem list ruby-oci8 *** LOCAL GEMS *** ruby-oci8 (2.1.2 ruby x86-mingw32, 2.0.6) C:\Lab\railapps\dbtestgem list activerecord-oracle_enhanced-adapter *** LOCAL GEMS *** activerecord-oracle_enhanced-adapter (1.4.1) database.yml under configure development: adapter: oracle_enhanced database: cvrman.cablevision.com username: ruby password: ruby

    Read the article

  • Error Installing ruby with RVM Single User mode on Arch Linux

    - by ChrisBurnor
    I've just installed RVM on ArchLinux x64 in single user mode via the recommended install script curl -L https://get.rvm.io | bash -s stable I've also installed all the requirements listed in rvm requirements However, I'm having trouble actually installing any version of ruby. And getting the following error: arch:~ % rvm install 1.9.3 No binary rubies available for: ///ruby-1.9.3-p194. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. Fetching yaml-0.1.4.tar.gz to /home/christopher/.rvm/archives % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 460k 100 460k 0 0 702k 0 --:--:-- --:--:-- --:--:-- 767k Extracting yaml-0.1.4.tar.gz to /home/christopher/.rvm/src Prepare yaml in /home/christopher/.rvm/src/yaml-0.1.4. Configuring yaml in /home/christopher/.rvm/src/yaml-0.1.4. Error running ' ./configure --prefix=/home/christopher/.rvm/usr ', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/yaml/configure.log Compiling yaml in /home/christopher/.rvm/src/yaml-0.1.4. Error running 'make', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/yaml/make.log Please note that it's required to reinstall all rubies: rvm reinstall all --force Installing Ruby from source to: /home/christopher/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)... ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection... ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /home/christopher/.rvm/src/ruby-1.9.3-p194 ruby-1.9.3-p194 - #extracted to /home/christopher/.rvm/src/ruby-1.9.3-p194 Skipping configure step, 'configure' does not exist, did autoreconf not run successfully? ruby-1.9.3-p194 - #compiling Error running 'make', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/make.log There has been an error while running make. Halting the installation. The log files are as follows: arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/yaml/configure.log __rvm_log_command:32: permission denied: arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/yaml/make.log make: *** No targets specified and no makefile found. Stop. arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/make.log make: *** No targets specified and no makefile found. Stop.

    Read the article

  • Fix Corrupted Ruby in Mac OS X Lion

    - by luckyb56
    I screwed up my ruby buy executing the command sudo easy_install pip> /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" It showed error: Couldn't find index page for '-e' (maybe misspelled?) No local packages or download links found for -e error: Could not find suitable distribution for Requirement.parse('-e') After that when I tried to install Brew by: /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" It shows error which I have no idea: /usr/bin/ruby: line 1: Searching: command not found /usr/bin/ruby: line 2: Best: command not found /usr/bin/ruby: line 3: Processing: command not found Usage: pip COMMAND [OPTIONS] pip: error: No command by the name pip 1.1 (maybe you meant "pip install 1.1") /usr/bin/ruby: line 5: Installing: command not found /usr/bin/ruby: line 6: Installing: command not found /usr/bin/ruby: line 8: Using: command not found /usr/bin/ruby: line 9: Processing: command not found /usr/bin/ruby: line 10: Finished: command not found /usr/bin/ruby: line 11: Searching: command not found /usr/bin/ruby: line 12: Reading: command not found /usr/bin/ruby: line 13: syntax error near unexpected token `(' /usr/bin/ruby: line 13: `Scanning index of all packages (this may take a while)' Can this be fixed?

    Read the article

  • Why do I get this error when I try to push my SQLite3 to Postgresql (via Taps) on Cedar Stack?

    - by rhodee
    I've done quite a bit of research on Heroku Dev Center and I am now looking to the community for help. Here is my problem. I can not push my db to Heroku Cedar Stack. I am trying to migrate a sqlite database to postgresql via Taps gem. When I am ready to deploy I run: bundle install --without production heroku run db:push I get the following result: Running db:seed attached to terminal... up, run.17 sh: db:seed: not found heroku run rake db:migrate And when I run the migration: heroku run rake db:migrate I get the following: Running rake db:migrate attached to terminal... up, run.18 rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) /usr/local/lib/ruby/1.9.1/rake.rb:2367:in `raw_load_rakefile' /usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile' /usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling' /usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile' /usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run' /usr/local/bin/rake:31:in `<main>' Everytime I push to Heroku (git push heroku master) it fails because my gem file is attempting to install sqlite3 gem-even though its inside of the development and test groups in my Gemfile. My database.yml production environment still points to sqlite adapter even after I have run the following command successfully: heroku config:add BUNDLE_WITHOUT="test development" --app app_name_on_heroku Out of ideas. Please help. If its useful I can post results of my gemfile, heroku ps and logs. Cheers UPDATE: After following @John's direction I now receive the following terminal message. Sending schema Schema: 100% |==========================================| Time: 00:00:07 Sending indexes schema_migrat: 100% |==========================================| Time: 00:00:00 Sending data 4 tables, 6 records schema_migrat: 0% | | ETA: --:--:-- Saving session to push_201111070749.dat.. !!! Caught Server Exception HTTP CODE: 500 Taps Server Error: LoadError: no such file to load -- sequel/adapters/ And the following warnings: ["/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:in require'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:inblock in tsk_require'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:72:in block in check_requiring_thread'", "<internal:prelude>:10:insynchronize'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:69:in check_requiring_thread'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:intsk_require'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:25:in adapter_class'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:54:inconnect'", "/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:119:in connect'", "/app/lib/taps/db_session.rb:14:inconn'", "/app/lib/taps/server.rb:91:in block in <class:Server>'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:865:incall'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:865:in block in route'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:521:ininstance_eval'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:521:in route_eval'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:500:inblock (2 levels) in route!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:in catch'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:inblock in route!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:476:in each'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:476:inroute!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:601:in dispatch!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411:inblock in call!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in instance_eval'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:inblock in invoke'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in catch'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininvoke'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411:in call!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:399:incall'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/auth/basic.rb:25:in call'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:979:inblock in call'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in synchronize'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:979:incall'", "/home/heroku_rack/lib/static_assets.rb:9:in call'", "/home/heroku_rack/lib/last_access.rb:15:incall'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:47:in block in call'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:41:ineach'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in call'", "/home/heroku_rack/lib/date_header.rb:14:incall'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:77:in call'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:76:inblock in pre_process'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in catch'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:inpre_process'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:57:in process'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:42:inreceive_data'", "/app/.bundle/gems/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run_machine'", "/app/.bundle/gems/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in start'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/server.rb:156:instart'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/controllers/controller.rb:80:in start'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:177:inrun_command'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:143:in run!'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/bin/thin:6:in'", "/usr/ruby1.9.2/bin/thin:19:in load'", "/usr/ruby1.9.2/bin/thin:19:in'"]

    Read the article

  • Getting Started with Ruby & Ruby on Rails

    - by JakeTheSnake
    Some background: I'm a jack-of-all traits, one of which is programming. I learned VB6 through Excel and PHP for creating websites and so far it's worked out just fine for me. I'm not CS major or even mathematically inclined - logic is what interests me. Current status: I'm willing to learn new and more powerful languages; my first foray into such a route is learning Ruby. I went to the main Ruby website and did the interactive intro. (by the way, I'm currently getting redirected to google.com when I try the link...it's happening to other websites as well...is my computer infected?) I liked what I learned and wanted to get started using Ruby to create websites. I downloaded InstantRails and installed it; everything so far has been fine - the program starts up just fine, and I can test some Ruby code in the console. However my troubles begin when I try and view a web page with Ruby code present. Lastly, my problem: As in PHP, I can browse to the .php file directly and through using PHP tags and some simple 'echo' statements I can be on my way in making dynamic web pages. However with the InstantRails app working, accessing a .rb or .rhtml page doesn't produce similar results. I made a simple text file named 'test.rb' and put basic HTML tags in there (html, head, body) and the Ruby tags <%= and % with some ruby code inside. The web page actually shows the tags and the code - as if it's all just plain HTML. I take it Ruby isn't parsing the page before it is displayed to the user, but this is where my lack of understanding of the Ruby environment stops me short. Where do I go from here?

    Read the article

  • How to map hash keys to methods for an encapsulated Ruby class (tableless model)?

    - by user502052
    I am using Ruby on Rails 3 and I am tryng to map a hash (key, value pairs) to an encapsulated Ruby class (tableless model) making the hash key as a class method that returns the value. In the model file I have class Users::Account #< ActiveRecord::Base def initialize(attributes = {}) @id = attributes[:id] @firstname = attributes[:firstname] @lastname = attributes[:lastname] end end def self.to_model(account) JSON.parse(account) end My hash is hash = {\"id\":2,\"firstname\":\"Name_test\",\"lastname\":\"Surname_test\"} I can make account = Users::Account.to_model(hash) that returns (debugging) --- id: 2 firstname: Name_test lastname: Surname_test That works, but if I do account.id I get this error NoMethodError in Users/accountsController#new undefined method `id' for #<Hash:0x00000104cda410> I think because <Hash:0x00000104cda410> is an hash (!) and not the class itself. Also I think that doing account = Users::Account.to_model(hash) is not the right approach. What is wrong? How can I "map" those hash keys to class methods?

    Read the article

  • Start Learning Ruby with IronRuby – Setting up the Environment

    - by kazimanzurrashid
    Recently I have decided to learn Ruby and for last few days I am playing with IronRuby. Learning a new thing is always been a fun and when it comes to adorable language like Ruby it becomes more entertaining. Like any other language, first we have to create the development environment. In order to run IronRuby we have to download the binaries form the IronRuby CodePlex project. IronRuby supports both .NET 2.0 and .NET 4, but .NET 4 is the recommended version, you can download either the installation or the zip file. If you download the zip file make sure you added the bin directory in the environment path variable. Once you are done, open up the command prompt and type : ir –v It should print message like: IronRuby 1.0.0.0 on .NET 4.0.30319.1 The ir is 32bit version of IronRuby, if you want to use 64bit you can try ir64. Next, we have to find a editor where we can write our Ruby code as there is currently no integration story of IronRuby with Visual Studio like its twin Iron Python. Among the free IDEs only SharpDevelop has the IronRuby support but it does not have auto complete or debugging built into it, only thing that it supports is the syntax highlighting, so using a text editor which has the same features is nothing different comparing to it. To play with the IronRuby we will be using Notepad++, which can be downloaded from its sourceforge download page. The Notepad++ does have a nice syntax highlighting support : I am using the Vibrant Ink with some little modification. The next thing we have to do is configure the Notepad++ that we can run the Ruby script in IronRuby inside the Notepad++. Lets create a batch(.bat) file in the IronRuby bin directory, which will have the following content: @echo off  cls call ir %1 pause This will make sure that the console will be paused once we run the script. Now click Run->Run in the Notepad++, it will bring up the run dialog and put the following command in the textbox: riir.bat "$(FULL_CURRENT_PATH)" Click the save which will bring another dialog. Type Iron Ruby and assign the shortcut to ctrl + f5 (Same as Visual Studio Start without Debugging) and click ok. Once you are done you will find the IronRuby in the Run menu. Now press ctrl + f5, we will find the ruby script running in the IronRuby. Now there are one last thing that we would like to add which is poor man’s context sensitive help. First, download the ruby language help file from the Ruby Installer site and extract into a directory. Next we will have to install the Language Help Plug-in of Notepad++, click Plugins->Plugin Manger –>Show Plugin Manager and scroll down until you find the plug-in the list, now check the plug-in and click install. Once it is installed it will prompt you to restart the Notepad++, click yes. When the Notepad++ restarts, click the Plugins –> Language Help –> Options –> add and enter the following details and click ok: The chm file location can be different depending upon where you extracted it. Now when you put your in any of ruby keyword and press ctrl + f1 it will take you to the help topic of that keyword. For example, when my caret is in the each of the following code and I press ctrl + f1, it will take me to the each api doc of Array. def loop_demo (1..10).each{ |n| puts n} end loop_demo That’s it for today. Happy Ruby coding.

    Read the article

  • PHP and Ruby: how to leverage both? and, is it worth it?

    - by dukeofgaming
    As you might have noticed from the title, this is not a "PHP or Ruby", or a "PHP vs. Ruby" question. This is a question on how to leverage PHP + Ruby in the same business. I myself am a PHP developer, I love the language because of its convenience and I specially love the ecosystem of resources that surround it: Joomla, Drupal, Wordpress, Symfony2, Doctrine2, etc. However, the language itself can be a little disappointing sometimes. OTOH, Ruby looks like a very beautiful language and —from studying it superficially in several aspects— I could say it is leaner than Python as a language per se. However, from what I've seen there is pretty much only RoR making noise, and I don't like RoR so much (mainly because its model layer). As Co-CEO and CTO at my company I'm trying to think outside of the box since I want to start to focus on the human side of technology and see if its sane to use both PHP and Ruby. Here are some random thoughts: Ruby folk seem to be generally better suited programmers than PHP folk (in terms of averages), I know the previous statement is somewhat baloney because very good and well architected PHP can be written, but I'd say the Ruby programmer culture is better than PHP's. The thing about Ruby is that it seems better suited for rapid development, I don't really know if this is only the case for RoR, but I do know that there are certain practices (perhaps not so good) like monkey patching that let business needs be satified quicker. From a marketing point of view (yep, sometimes you need to leverage the marketing BS for the sake of your company) Ruby seems better while PHP carries some stigmas. PHP 5.4 is bringing traits, and that is better/cleaner than mixins. That could really make PHP as lean as Ruby —or more— for certain stuff. Now, concretely, my questions: Would a PHP programmer want to learn Ruby?, I know I do, but conversely, would a Ruby programmer want to learn PHP?. What kinds of projects or situations would be better suited for Ruby that are not suited for PHP?. What is the actual ecosystem of Ruby?, aside from RoR, I have not seen other hyped technologies/frameworks (I've seen RSpec, but I confess being a total noob on what BDD really consists of and its implications). Supposing there are a certain type of projects ideal for Ruby, would there be a moment that its better to move it to PHP?. I know PHP can handle lots of stuff, but I've read that Ruby has its limitations when scaling (or is that RoR?, or is that baloney for both?). Finally and most importantly, would it be sane to maintain projects in two languages?, or is that just stupid. As I said, it looks like Ruby is leaner on the short term and that can make a project happen and succeed, but I'm not so sure about that on the long run. I'm looking for insights mainly from people that know well the strengths and weaknesses of the languages —preferably both of them— and Ruby's ecosystem in real practice, meaning: frameworks and applications like the ones I quoted from PHP's ecosystem. Best regards and thanks for your time.

    Read the article

  • Ruby gem already activated

    - by Eric the Red
    How can I de-activate the newer version of cucumber, or get this to work with the earlier version? user$ rake features (in /Users/user/Project) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I "/Library/Ruby/Gems/1.8/gems/cucumber-0.6.1/lib:lib" "/Library/Ruby/Gems/1.8/gems/cucumber- 0.6.1/bin/cucumber" --format pretty can't activate cucumber (= 0.4.4, runtime) for [], already activated cucumber-0.6.1 for [] (Gem::LoadError) /Library/Ruby/Site/1.8/rubygems.rb:280:in `activate'

    Read the article

  • json problems with making a ruby on rails application

    - by Prince Merdz
    So I'm using Bitnami to learn Ruby on Rails. I have also previously tried the manual installation for ruby and rails and was met by the same problem so I thought I should try first the easy package deal of Bitnami. Anyway my problem with json is that it causes the bundle install to fail. First the auto bundle install that rails new does fails because of an ssl error. Which is easily solved by changing the source in the gemfile which is https to http. However when I try to bundle install it does another error when it tries to install json. C:\RubyStack-3.2.7-0\projects\testing>bundle install Fetching gem metadata from http://rubygems.org/......... Using rake (0.9.2.2) Using i18n (0.6.0) Using multi_json (1.3.6) Installing activesupport (3.2.8) Using builder (3.0.0) Installing activemodel (3.2.8) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.1) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.3) Installing actionpack (3.2.8) Using mime-types (1.19) Using polyglot (0.3.3) Using treetop (1.4.10) Using mail (2.4.4) Installing actionmailer (3.2.8) Using arel (3.0.2) Using tzinfo (0.3.33) Installing activerecord (3.2.8) Installing activeresource (3.2.8) Using bundler (1.1.5) Using coffee-script-source (1.3.3) Using execjs (1.4.0) Using coffee-script (2.2.0) Using rack-ssl (1.3.2) Installing json (1.7.5) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension . C:/RUBYST~1.7-0/ruby/bin/ruby.exe extconf.rb creating Makefile make 0 [main] echo 5244 open_stackdumpfile: Dumping stack trace to echo.exe.sta ckdump make: *** [generator-i386-mingw32.def] Error 5 Gem files will remain installed in C:/RUBYST~1.7-0/ruby/lib/ruby/gems/1.9.1/gems /json-1.7.5 for inspection. Results logged to C:/RUBYST~1.7-0/ruby/lib/ruby/gems/1.9.1/gems/json-1.7.5/ext/j son/ext/generator/gem_make.out An error occured while installing json (1.7.5), and Bundler cannot continue. Make sure that `gem install json -v '1.7.5'` succeeds before bundling. This is the gem_make.out file it produces after trying to install json (btw windows also produces an error that echo.exe has stopped working while running the gem install json) C:/RUBYST~1.7-0/ruby/bin/ruby.exe extconf.rb creating Makefile make 0 [main] echo 5244 open_stackdumpfile: Dumping stack trace to echo.exe.stackdump make: *** [generator-i386-mingw32.def] Error 5 I can't even start learning ror for the setup is already a huge pain. (btw I have no prior experience with web frameworks, just desktop programming). help?

    Read the article

  • Why is this RMagick call generating a segmentation fault?

    - by Grant Heaslip
    I've been banging my head against the wall for the better part of an hour trying to figure out what's going wrong here, and I'm sure (or rather hoping) it's something fairly obvious that I'm overlooking. I'm using Ruby 1.9.1, Sinatra 1.0, and RMagick 2.13.1. ImageMagick and RMagick are correctly installed and functional—I've successfully manipulated and saved images from irb. The relevant part of the params array (formatting changes for the sake of readability): {"admin_user_new_image_file"=> { :filename=>"freddie-on-shetland-pony.png", :type=>"image/png", :name=>"admin_user_new_image_file", :tempfile=>#<File:/var/folders/a7/a7pO5jMcGLCww9XBGRvWfE+++TI/-Tmp-/RackMultipart20100514-20700-o2tkqu-0>, :head=>"Content-Disposition: form-data; name=\"admin_user_new_image_file\"; filename=\"freddie-on-shetland-pony.png\"\r\nContent-Type: image/png\r\n" } } The relevant code: post "/admin/user/:account_name/image/new/" do if params[:admin_user_new_image_file][:tempfile] thumbnail = Magick::Image.read("png:"+params[:admin_user_new_image_file][:tempfile].path).first end end The error (line 229 is the line starting with "thumbnail = ": config.ru:229: [BUG] Segmentation fault ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.3.0] -- control frame ---------- c:0042 p:---- s:0196 b:0196 l:000195 d:000195 CFUNC :read c:0041 p:0121 s:0192 b:0192 l:001ab8 d:000191 LAMBDA config.ru:229 c:0040 p:---- s:0189 b:0189 l:000188 d:000188 FINISH c:0039 p:---- s:0187 b:0187 l:000186 d:000186 CFUNC :call c:0038 p:0018 s:0184 b:0184 l:001d78 d:000183 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:865 c:0037 p:---- s:0182 b:0182 l:000181 d:000181 FINISH c:0036 p:---- s:0180 b:0180 l:000179 d:000179 CFUNC :instance_eval c:0035 p:0016 s:0177 b:0175 l:000174 d:000174 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:521 c:0034 p:0024 s:0171 b:0171 l:000148 d:000170 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:500 c:0033 p:---- s:0169 b:0169 l:000168 d:000168 FINISH c:0032 p:---- s:0167 b:0167 l:000166 d:000166 CFUNC :catch c:0031 p:0140 s:0163 b:0163 l:000148 d:000162 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497 c:0030 p:---- s:0154 b:0154 l:000153 d:000153 FINISH c:0029 p:---- s:0152 b:0152 l:000151 d:000151 CFUNC :each c:0028 p:0073 s:0149 b:0149 l:000148 d:000148 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:476 c:0027 p:0076 s:0141 b:0141 l:000140 d:000140 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:601 c:0026 p:0009 s:0137 b:0137 l:000138 d:000136 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411 c:0025 p:---- s:0135 b:0135 l:000134 d:000134 FINISH c:0024 p:---- s:0133 b:0133 l:000132 d:000132 CFUNC :instance_eval c:0023 p:0012 s:0130 b:0130 l:000121 d:000129 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566 c:0022 p:---- s:0128 b:0128 l:000127 d:000127 FINISH c:0021 p:---- s:0126 b:0126 l:000125 d:000125 CFUNC :catch c:0020 p:0013 s:0122 b:0122 l:000121 d:000121 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566 c:0019 p:0098 s:0115 b:0115 l:000138 d:000138 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411 c:0018 p:0019 s:0108 b:0108 l:000107 d:000107 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:399 c:0017 p:0014 s:0104 b:0104 l:000103 d:000103 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/showexceptions.rb:24 c:0016 p:0150 s:0098 b:0098 l:000097 d:000097 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/methodoverride.rb:24 c:0015 p:0031 s:0092 b:0092 l:000091 d:000091 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/commonlogger.rb:18 c:0014 p:0018 s:0084 b:0084 l:002080 d:000083 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:979 c:0013 p:0032 s:0082 b:0082 l:000081 d:000081 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:1005 c:0012 p:0011 s:0078 b:0078 l:002080 d:002080 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:979 c:0011 p:0100 s:0074 b:0074 l:000ff0 d:000ff0 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/lint.rb:47 c:0010 p:0022 s:0068 b:0068 l:000067 d:000067 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/lint.rb:35 c:0009 p:0014 s:0064 b:0064 l:000063 d:000063 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/showexceptions.rb:24 c:0008 p:0031 s:0058 b:0058 l:000057 d:000057 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/commonlogger.rb:18 c:0007 p:0014 s:0050 b:0050 l:000049 d:000049 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/content_length.rb:13 c:0006 p:0320 s:0042 b:0042 l:000041 d:000041 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48 c:0005 p:0256 s:0030 b:0030 l:000029 d:000029 METHOD /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111 c:0004 p:0382 s:0020 b:0020 l:000019 d:000019 METHOD /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70 c:0003 p:0123 s:0009 b:0009 l:000bc8 d:000008 BLOCK /usr/local/lib/ruby/1.9.1/webrick/server.rb:183 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP --------------------------- -- Ruby level backtrace information----------------------------------------- config.ru:229:in `read' config.ru:229:in `block (2 levels) in <main>' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:865:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:865:in `block in route' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `block (2 levels) in route!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `block in route!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `route!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `block in call!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `block in invoke' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `block in call' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchronize' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service' /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' -- C level backtrace information ------------------------------------------- 0x10010cd8d 0 libruby.dylib 0x000000010010cd8d rb_vm_bugreport + 77 0x10002b184 1 libruby.dylib 0x000000010002b184 report_bug + 260 0x10002b318 2 libruby.dylib 0x000000010002b318 rb_bug + 200 0x1000b7124 3 libruby.dylib 0x00000001000b7124 sigsegv + 132 0x7fff8301c80a 4 libSystem.B.dylib 0x00007fff8301c80a _sigtramp + 26 0x1032313ac 5 libMagickCore.3.dylib 0x00000001032313ac Splay + 300 0x103119245 6 libMagickCore.3.dylib 0x0000000103119245 AcquirePixelCache + 325 0x1031cb317 7 libMagickCore.3.dylib 0x00000001031cb317 AcquireImage + 375 0x10333035b 8 libMagickCore.3.dylib 0x000000010333035b ReadPNGImage + 155 0x1031418fd 9 libMagickCore.3.dylib 0x00000001031418fd ReadImage + 2221 0x101f1b72b 10 RMagick2.bundle 0x0000000101f1b72b rd_image + 339 0x101f1b59b 11 RMagick2.bundle 0x0000000101f1b59b Image_read + 36 0x1000fd0e4 12 libruby.dylib 0x00000001000fd0e4 vm_call_cfunc + 340 0x1000fe9b0 13 libruby.dylib 0x00000001000fe9b0 vm_call_method + 896 0x1000ff8fc 14 libruby.dylib 0x00000001000ff8fc vm_exec_core + 3180 0x100104b93 15 libruby.dylib 0x0000000100104b93 vm_exec + 1203 0x100106643 16 libruby.dylib 0x0000000100106643 rb_vm_invoke_proc + 691 0x100106ccd 17 libruby.dylib 0x0000000100106ccd vm_call0 + 1085 0x1000317c6 18 libruby.dylib 0x00000001000317c6 rb_method_call + 406 0x1000fd0e4 19 libruby.dylib 0x00000001000fd0e4 vm_call_cfunc + 340 0x1000fe9b0 20 libruby.dylib 0x00000001000fe9b0 vm_call_method + 896 0x1000ff8fc 21 libruby.dylib 0x00000001000ff8fc vm_exec_core + 3180 0x100104b93 22 libruby.dylib 0x0000000100104b93 vm_exec + 1203 0x100105ce6 23 libruby.dylib 0x0000000100105ce6 yield_under + 710 0x100106188 24 libruby.dylib 0x0000000100106188 specific_eval + 72 0x1000fd0e4 25 libruby.dylib 0x00000001000fd0e4 vm_call_cfunc + 340 0x1000fe9b0 26 libruby.dylib 0x00000001000fe9b0 vm_call_method + 896 0x1000ff8fc 27 libruby.dylib 0x00000001000ff8fc vm_exec_core + 3180 0x100104b93 28 libruby.dylib 0x0000000100104b93 vm_exec + 1203 0x10010b6bf 29 libruby.dylib 0x000000010010b6bf rb_f_catch + 639 0x1000fd0e4 30 libruby.dylib 0x00000001000fd0e4 vm_call_cfunc + 340 0x1000fe9b0 31 libruby.dylib 0x00000001000fe9b0 vm_call_method + 896 0x1000ff8fc 32 libruby.dylib 0x00000001000ff8fc vm_exec_core + 3180 0x100104b93 33 libruby.dylib 0x0000000100104b93 vm_exec + 1203 0x10010aac9 34 libruby.dylib 0x000000010010aac9 rb_yield + 505 0x100007902 35 libruby.dylib 0x0000000100007902 rb_ary_each + 82 0x1000fd0e4 36 libruby.dylib 0x00000001000fd0e4 vm_call_cfunc + 340 0x1000fe9b0 37 libruby.dylib 0x00000001000fe9b0 vm_call_method + 896 0x1000ff8fc 38 libruby.dylib 0x00000001000ff8fc vm_exec_core + 3180 0x100104b93 39 libruby.dylib 0x0000000100104b93 vm_exec + 1203 0x100105ce6 40 libruby.dylib 0x0000000100105ce6 yield_under + 710 0x100106188 41 libruby.dylib 0x0000000100106188 specific_eval + 72 0x1000fd0e4 42 libruby.dylib 0x00000001000fd0e4 vm_call_cfunc + 340 0x1000fe9b0 43 libruby.dylib 0x00000001000fe9b0 vm_call_method + 896 0x1000ff8fc 44 libruby.dylib 0x00000001000ff8fc vm_exec_core + 3180 0x100104b93 45 libruby.dylib 0x0000000100104b93 vm_exec + 1203 0x10010b6bf 46 libruby.dylib 0x000000010010b6bf rb_f_catch + 639 0x1000fd0e4 47 libruby.dylib 0x00000001000fd0e4 vm_call_cfunc + 340 0x1000fe9b0 48 libruby.dylib 0x00000001000fe9b0 vm_call_method + 896 0x1000ff8fc 49 libruby.dylib 0x00000001000ff8fc vm_exec_core + 3180 0x100104b93 50 libruby.dylib 0x0000000100104b93 vm_exec + 1203 0x100106643 51 libruby.dylib 0x0000000100106643 rb_vm_invoke_proc + 691 0x100111803 52 libruby.dylib 0x0000000100111803 thread_start_func_2 + 835 0x100111921 53 libruby.dylib 0x0000000100111921 thread_start_func_1 + 17 0x7fff82ff58b6 54 libSystem.B.dylib 0x00007fff82ff58b6 _pthread_start + 331 0x7fff82ff5769 55 libSystem.B.dylib 0x00007fff82ff5769 thread_start + 13 [NOTE] You may encounter a bug of Ruby interpreter. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html Abort trap Anyone have any idea what's going on? Thanks!

    Read the article

  • Error while reading from spreadsheet in Ruby

    - by intern
    I am getting following error while reading from a spreadsheet file. I have searched alot on Google. I have seen posts with similar problems but no reply to the problems. Does anyone know how to resolve this error? C:/Ruby/lib/ruby/gems/1.8/gems/ruby-ole-1.2.8.2/lib/ole/storage/file_system.rb:125:in `dirent_from_path': No such file or directory - Workbook (Errno::ENOENT) from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-ole-1.2.8.2/lib/ole/storage/file_system.rb:158:in `open' from C:/Ruby/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3/lib/spreadsheet/excel/reader.rb:1060:in `setup' from C:/Ruby/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3/lib/spreadsheet/excel/reader.rb:118:in `read' from C:/Ruby/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3/lib/spreadsheet/excel/workbook.rb:32:in `open' from C:/Ruby/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3/lib/spreadsheet.rb:62:in `open' from C:/Ruby/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3/lib/spreadsheet.rb:68:in `open' from Fluent_search.rb:90:in `initialize' from Fluent_search.rb:77:in `new' from Fluent_search.rb:77:in `display_from' from Fluent_search.rb:97

    Read the article

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