Search Results

Search found 10241 results on 410 pages for 'sqlite3 ruby'.

Page 9/410 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to get decent MySQL driver perfomance in Ruby

    - by Zombies
    I notice that I am getting very poor performance for either or both inserts and queries. The queries themselves are basic and can execute with no delay directly from mysql. The ruby script that I wrote is only 1 thread, so only 1 connection is being used, and never closed unless the script is terminated. Pretty basic, I am just trying to insert a lot of rows. There is a look-up or two to get a surrogate key, or to check for duplicates, but the complexity is just O(n). Also, it isn't like there are millions of records, so again the queries themselves take no time to run. I am using: Ruby 1.9.1 Gem/driver:ruby-mysql 2.9.2 MySQL 5.1.37-1ubuntu5.1 ^ all 32 bit versions on a 32bit ubuntu distro I am getting about 1-2 inserts per second, pretty slow. I know a lot of people will suggest to change drivers, but that means I have some refactoring and resting to do. So I would really appreciate any help, but please if you do recomend that at least say why you do (eg: if you have used ruby-mysql x.x.x before and found another mysql driver to be better).ruby-mysql 2.9.2 What I would like to know: How can I improve performance with ruby-mysql 2.9.2 If and only if I cannot do this with ruby-mysql 2.9.2, what should I do?

    Read the article

  • Why’s (Poignant) Guide to Ruby

    - by Ben Griswold
    You’re familiar with O’Reilly’s brilliant Head First Series, right?  Great.  Then you know how every book begins with an explanation of the Head First teaching style and you know the teaching format which Kathy Sierra and Bert Bates developed is based on research in cognitive science, neurobiology and educational psychology and it’s all about making learning visual and conversational and attractive and emotional and it’s highly effective.  Anyway, it’s a great series and you should read every last one of the books. Moving on… I’ve been wanting to learn more about Ruby and Why’s (Poignant) Guide to Ruby has been on my reading list for a while and there was talk about cartoon foxes and other silliness and I figured Why’s (Poignant) Guide to Ruby probably takes the same unorthodox teaching style as the Head First books – and that’s great – so I read the book, in piecemeal, over the last couple of weeks and, well, I figured wrong. Now having read the book, here’s my take on Why’s (Poignant) Guide – it’s very creative and clever and it does a darn good job of introducing one to Ruby.  If you’re interested in Ruby or simply interested, the online book is worth your time.  If you’re thinking (like me) that cartoon foxes will be doing the teaching, that’s simple not the case.  However, the cartoons and the random stories in the sidebar may serve a purpose. Unlike the Head First books where images and captions are used to further explain the teachings, the cartoons and stories in Why’s Guide serve as intermission and offer your brain a brief moment of rest before the next Ruby concept is explained.  It’s not a bad strategy, but definitely not as effective as the Head First techniques.  

    Read the article

  • Should a Python programmer learn Ruby?

    - by C J
    Hi! I have been a Python programmer for around 1.5 years (one internship + side projects), so I am comfortable with the language. Given that everyone is talking about Ruby these days, and I mean seriously! No one bothers about Python (from what I've seen). See GitHub. All RoR. I apply for a job and they ask me about RoR. I look at the screencasts on peepcode.com and they are in Ruby. gitimmersion.com has all the tutorial in Ruby! I know this is pretty vague, but still... why Ruby! Everyone these days is obssessed with RoR! Why not Python? Anyways, my questions are: Should I learn Ruby? Is learning Ruby when knowing Python be, er, complicated for me? Or is it going to be just like learning any other language? Thanks!

    Read the article

  • The speed of Ruby and Java.

    - by Simon
    In every benchmark that I found on the web it seems that Ruby is slow, much slower than Java. The Ruby folks just state that it doesn't matter. Could you give me any example that the speed of Ruby on Rails (and the Ruby itself) really doesn't matter?

    Read the article

  • Conflicting ruby versions

    - by DavidP6
    I am having problems with conflicting versions of Ruby that I have installed. I had 1.8.6 and then installed 1.8.7 and it has caused problems. I get the following error when trying to run my ruby on rails app: /usr/local/lib/ruby/1.8/i686-linux/rbconfig.rb:7: ruby lib version (1.8.6) doesn't match executable version (1.8.7) (RuntimeError) I would like to remove 1.8.7 somehow and just use 1.8.6 but have no idea how to go about doing this.

    Read the article

  • Trouble on setting SSL certificates for Virtual Hosts using Apache\Phusion Passenger in localhost

    - by user502052
    I am using Ruby on Rails 3 and I would like to make to work HTTPS connections on localhost. I am using: Apache v2 + Phusion Passenger Mac OS + Snow Leopard v10.6.6 My Ruby on Rails installation use the Typhoeus gem (it is possible to use the Ruby net\http library but the result doesn't change) to make HTTP requests over HTTPS. I created self-signed ca.key, pjtname.crt and pjtname.key as detailed on the Apple website. Notice: Following instruction from the Apple website, on running the openssl req -new -key server.key -out server.csr command (see the link) at this point Common Name (eg, YOUR name) []: (this is the important one) I entered *pjtname.com so that is valid for all sub_domain of that site. In my Apache httpd.conf I have two virtual hosts configured in this way: # Secure (SSL/TLS) connections #Include /private/etc/apache2/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> Include /private/etc/apache2/other/*.conf # Passenger configuration LoadModule passenger_module /Users/<my_user_name>/.rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/ext/apache2/mod_passenger.so PassengerRoot /Users/<my_user_name>/.rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2 PassengerRuby /Users/<my_user_name>/.rvm/wrappers/ruby-1.9.2-p136/ruby # Go ahead and accept connections for these vhosts # from non-SNI clients SSLStrictSNIVHostCheck off # Ensure that Apache listens on port 443 Listen 443 # Listen for virtual host requests on all IP addresses NameVirtualHost *:80 NameVirtualHost *:443 # # PJTNAME.COM and subdomains SETTING # <VirtualHost *:443> # Because this virtual host is defined first, it will # be used as the default if the hostname is not received # in the SSL handshake, e.g. if the browser doesn't support # SNI. ServerName pjtname.com:443 DocumentRoot "/Users/<my_user_name>/Sites/pjtname.com/pjtname.com/public" ServerAdmin [email protected] ErrorLog "/private/var/log/apache2/error_log" TransferLog "/private/var/log/apache2/access_log" RackEnv development <Directory "/Users/<my_user_name>/Sites/pjtname.com/pjtname.com/public"> Order allow,deny Allow from all </Directory> # SSL Configuration SSLEngine on # Self Signed certificates # Server Certificate SSLCertificateFile /private/etc/apache2/ssl/wildcard.certificate/pjtname.crt # Server Private Key SSLCertificateKeyFile /private/etc/apache2/ssl/wildcard.certificate/pjtname.key # Server Intermediate Bundle SSLCertificateChainFile /private/etc/apache2/ssl/wildcard.certificate/ca.crt </VirtualHost> # HTTP Setting <VirtualHost *:80> ServerName pjtname.com DocumentRoot "/Users/<my_user_name>/Sites/pjtname.com/pjtname.com/public" RackEnv development <Directory "/Users/<my_user_name>/Sites/pjtname.com/pjtname.com/public"> Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:443> ServerName users.pjtname.com:443 DocumentRoot "/Users/<my_user_name>/Sites/pjtname.com/users.pjtname.com/public" ServerAdmin [email protected] ErrorLog "/private/var/log/apache2/error_log" TransferLog "/private/var/log/apache2/access_log" RackEnv development <Directory "/Users/<my_user_name>/Sites/pjtname.com/users.pjtname.com/public"> Order allow,deny Allow from all </Directory> # SSL Configuration SSLEngine on # Self Signed certificates # Server Certificate SSLCertificateFile /private/etc/apache2/ssl/wildcard.certificate/pjtname.crt # Server Private Key SSLCertificateKeyFile /private/etc/apache2/ssl/wildcard.certificate/pjtname.key # Server Intermediate Bundle SSLCertificateChainFile /private/etc/apache2/ssl/wildcard.certificate/ca.crt </VirtualHost> # HTTP Setting <VirtualHost *:80> ServerName users.pjtname.com DocumentRoot "/Users/<my_user_name>/Sites/pjtname.com/users.pjtname.com/public" RackEnv development <Directory "/Users/<my_user_name>/Sites/pjtname.com/users.pjtname.com/public"> Order allow,deny Allow from all </Directory> </VirtualHost> In the host file I have: ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost # PJTNAME.COM SETTING 127.0.0.1 pjtname.com 127.0.0.1 users.pjtname.com All seems to work properly because I have already set everything (I think correctly): I generated a wildcard certificate for my domains and sub-domains (in this example: *.pjtname.com) I have set base-named virtualhosts in the http.conf file listening on port :433 and :80 My browser accept certificates also if it alerts me that those aren't safe (notice: I must accept certificates for each domain\sub-domain; that is, [only] at the first time I access a domain or sub-domain over HTTPS I must do the same procedure for acceptance) and I can have access to pages using HTTPS After all this work, when I make a request using Typhoeus (I can use also the Ruby Net::Http library and the result doesn't change) from the pjtname.com RoR application: # Typhoeus request Typhoeus::Request.get("https://users.pjtname.com/") I get something like a warning about the certificate: --- &id001 !ruby/object:Typhoeus::Response app_connect_time: 0.0 body: "" code: 0 connect_time: 0.000625 # Here is the warning curl_error_message: Peer certificate cannot be authenticated with known CA certificates curl_return_code: 60 effective_url: https://users.pjtname.com/ headers: "" http_version: mock: false name_lookup_time: 0.000513 pretransfer_time: 0.0 request: !ruby/object:Typhoeus::Request after_complete: auth_method: body: ... All this means that something is wrong. So, what I have to do to avoid the "Peer certificate cannot be authenticated with known CA certificates" warning and make the HTTPS request to work? Where is\are the error\errors (I think in the Apache configuration, but where?!)? P.S.: if you need some more info, let me know.

    Read the article

  • Rails3 and `cd somehwere && do something`

    - by Samer Abukhait
    I have a rails project that has other projects under it, sub-projects have rake and bundler files. When I do ruby -e `cd sub-project && rake`, or ruby -e `cd sub-project && bundle`, commands work as expected and use the sub-project rake/bundler files. However, when I do the same thing from a Rails3 console (rails 3.0.3), rake gives the error no such file to load -- initializer, and bundle operates as if it was fired from the root directory. I tried the same commands from a Rails2.3.10 console and they worked as expected. Is Rails3 doing something wrong here? I am using Ruby 1.9.2 via RVM. $ ruby -v ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]

    Read the article

  • Trying to use a authlogic-connect as a plugin in place of gem - Server doesn't start

    - by Arkid
    I am trying to use Authlogic-connect as a plugin in Rails 3 in place of a gem. I have made an entry in the gemfile as gem "authlogic-connect", :require => "authlogic-connect", :path => "localgems" Now when I run the bundle install, it runs fine. When I try to start the server i get the error Could not find gem 'authlogic-connect (>= 0, runtime)' in source at localgems. Source does not contain any versions of 'authlogic-connect (>= 0, runtime)' Try running `bundle install`. I have placed the unzipped Gem renamed as authlogic-connect in the localgems folder. what is the problem? Here is what I get on using rails plugin install arkidmitra$ rails plugin install git://github.com/viatropos/authlogic-connect.git Usage: rails new APP_PATH [options] Options: [--skip-gemfile] # Don't create a Gemfile -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) # Default: sqlite3 -O, [--skip-active-record] # Skip Active Record files [--dev] # Setup the application with Gemfile pointing to your Rails checkout -J, [--skip-prototype] # Skip Prototype files -T, [--skip-test-unit] # Skip Test::Unit files -G, [--skip-git] # Skip Git ignores and keeps -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) -b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL) [--edge] # Setup the application with Gemfile pointing to Rails repository Runtime options: -q, [--quiet] # Supress status output -s, [--skip] # Skip files that already exist -f, [--force] # Overwrite files that already exist -p, [--pretend] # Run but do not make any changes Rails options: -h, [--help] # Show this help message and quit -v, [--version] # Show Rails version number and quit Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog. See the README in the newly created application to get going.

    Read the article

  • Shared Server Dreamhost

    - by Jseb
    I am trying to install an app on a shared server. If i understand properly because i am using a shared server, and that Dreamhost doesn't suppose rails 3.2.8 I must use FCGI, although i am not sure how to install and to make it run properly. From this tutorial http://wiki.dreamhost.com/Rails_3. To my understand here what I did, In dreamhost, activate PHP 5.x.x FastCGI and made sure Phusion Passenger is unchecked Create an app on my localmachine Because rails doesn't create a dispatch and access file i create the two following file in my /public folder dispatch.fcgi #!/home/username/.rvm/rubies/ruby-1.9.3-p327/bin/ruby ENV['RAILS_ENV'] ||= 'production' ENV['HOME'] ||= `echo ~`.strip ENV['GEM_HOME'] = File.expand_path('~/.rvm/gems/ruby 1.9.3-p327') ENV['GEM_PATH'] = File.expand_path('~/.rvm/gems/ruby 1.9.3-p327') + ":" + File.expand_path('~/.rvm/gems/ruby 1.9.3-p327@global') require 'fcgi' require File.join(File.dirname(__FILE__), '../config/environment') class Rack::PathInfoRewriter def initialize(app) @app = app end def call(env) env.delete('SCRIPT_NAME') parts = env['REQUEST_URI'].split('?') env['PATH_INFO'] = parts[0] env['QUERY_STRING'] = parts[1].to_s @app.call(env) end end Then created the file .htaccess <IfModule mod_fastcgi.c> AddHandler fastcgi-script .fcgi </IfModule> <IfModule mod_fcgid.c> AddHandler fcgid-script .fcgi </IfModule> Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L] ErrorDocument 500 "Rails application failed to start properly" Uploaded to a folder and pointed to the public folder in dreamhost Made sure dispatch.fcgi has 777 for write ssh and run the following command in the public folder : ./dispatch.fcgi Crossing my finger but it doesn't work I get the following errors ./dispatch.fcgi: line 1: ENV[RAILS_ENV]: command not found ./dispatch.fcgi: line 1: =: command not found ./dispatch.fcgi: line 2: ENV[HOME]: command not found ./dispatch.fcgi: line 2: =: command not found ./dispatch.fcgi: line 3: syntax error near unexpected token (' ./dispatch.fcgi: line 3:ENV['GEM_HOME'] = File.expand_path('~/.rvm/gems/ruby 1.9.3-p327')' Doing wrong??? Oh and if i go on the server i get this Rails application failed to start properly

    Read the article

  • Why does 6.times.map work in ruby 1.8.7 but not 1.8.6

    - by Lee
    The following code snippet works fine in 1.8.7 on Mac OS X, but not in 1.8.6 on Ubuntu. Why? Is there a workaround? Works in 1.8.7: $ ruby --version ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0] ltredgate15:eegl leem$ irb >> 6.times.map {'foo'} => ["foo", "foo", "foo", "foo", "foo", "foo"] >> But not in 1.8.6: # ruby --version ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux] Ruby Enterprise Edition 20090610 # irb irb(main):001:0> 6.times.map {'foo'} LocalJumpError: no block given from (irb):1:in `times' from (irb):1 irb(main):002:0> Why is there a difference? What's the workaround for 1.8.6?

    Read the article

  • What is the best way to set a database entry so that it expires after n hours using Ruby/Rails?

    - by marcgg
    My app has a token model as such: class Token < ActiveRecord::Base # The model include a few attributes including created_at end I want entries linked to this model to expire after 6 hours, meaning that they should get automatically deleted. I know that I could set a cronjob or something similar to do this, but isn't there a better/simpler way? Note: I'm using Rails 3.0.0beta3, mysql (in dev) and postgres (in prod)

    Read the article

  • Why doesn't this Ruby on Rails code work as I intend it to?

    - by Justin Meltzer
    So I attempted to build what I asked about in this question: Fix voting mechanism However, this solution doesn't work. A user can still vote however many times he or she wants. How could I fix this and/or refactor? def create @video = Video.find(params[:video_id]) @vote = @video.video_votes.new @vote.user = current_user if params[:type] == "up" @vote.value = 1 else @vote.value = -1 end if @previous_vote.nil? if @vote.save respond_to do |format| format.html { redirect_to @video } format.js end else respond_to do |format| format.html { redirect_to @video } format.js {render 'fail_create.js.erb'} end end elsif @previous_vote.value == params[:type] @previous_vote.destroy else @previous_vote.destroy if @vote.save respond_to do |format| format.html { redirect_to @video } format.js end else respond_to do |format| format.html { redirect_to @video } format.js {render 'fail_create.js.erb'} end end end @previous_vote = VideoVote.where(:video_id => params[:video_id], :user_id => current_user.id).first end

    Read the article

  • how to copy a sqlite3 table to another file in python

    - by james
    hey i was wondering how i could make a copy of a sqlite3 table and save it to a seperate file in python. im confused as in python your sqlite3 object can only be connected to one database so how would i make it save to a seperate database? the reason i want to do this is in sqlite3 the database file size can never get smaller, and ive made alot of changes so i want just copy this table to another file which wont have all the extra empty space and then delete the origonal database thanks guys

    Read the article

  • Python and sqlite3 - importing and exporting databases

    - by JPC
    I'm trying to write a script to import a database file. I wrote the script to export the file like so: import sqlite3 con = sqlite3.connect('../sqlite.db') with open('../dump.sql', 'w') as f: for line in con.iterdump(): f.write('%s\n' % line) Now I want to be able to import that database. I tried: import sqlite3 con = sqlite3.connect('../sqlite.db') f = open('../dump.sql','r') str = f.read() con.execute(str) but I'm not allowed to execute more than one statement. Is there a way to get it to run a .sql script directly?

    Read the article

  • Create sqlite3 database at prompt

    - by user15432
    I tried using the following commands to create a database file at prompt, but none of them would work. $ sqlite3 test.db sqlite3 test.db test.db does it require a semi-colon at the end or is it that hard to create a database file using sqlite3 prompt?

    Read the article

  • mysql error using Rails-- Please help

    - by Cypher
    Alright I am sry for the noob question but this has been driving me up a wall-especially because I got it to work yesterday and I can't remember what I did.... I am just trying to use mysql with rails with a mongrel server. I set up the server fine and can run rails applications that don't need mysql but when I create a project using (for example) rails -d mysql blog and then create some simple controller e.g. ruby script/generate Test then put this code in the controller... class TestController < ApplicationController def index render :text => 'WORK' end end then when I start the server up and open up localhost:3000/test I get the following error: = Booting Mongrel = Rails 2.3.5 application starting on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server /!\ FAILSAFE /!\ Mon May 10 20:15:06 -0500 2010 Status: 500 Internal Server Error Can't connect to MySQL server on 'localhost' (10061) C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/mysql_adapter.rb:589:in 'real_connect' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/mysql_adapter.rb:589:in 'connect' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/mysql_adapter.rb:203:in 'initialize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/mysql_adapter.rb:75:in 'new' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/mysql_adapter.rb:75:in 'mysql_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:223:in 'send' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:223:in 'new_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:245:in 'checkout_new_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:188:in 'checkout' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:184:in 'loop' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:184:in 'checkout' C:/Ruby/lib/ruby/1.8/monitor.rb:242:in 'synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:183:in 'checkout' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:98:in 'connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_pool.rb:326:in 'retrieve_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_specification.rb:123:in 'retrieve_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapter s/abstract/connection_specification.rb:115:in 'connection' etc... In the browser i get a 'We're sorry, but something went wrong' Does anyone know what I am doing wrong?

    Read the article

  • Cannot use ruby-debug19 with 1.9.3-p0?

    - by Stefan Kendall
    I run this: gem install ruby-debug19 And in my cucumber env.rb file, I have this: require 'ruby-debug' When I try to run, though, I get this exception: /home/skendall/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_current_thread - /home/skendall/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so (LoadError) What do I need to do to get ruby-debug to work with 1.9.3-p0?

    Read the article

  • Compile PHP Error with freetype

    - by Robert Ross
    Hey Guys, I configured PHP myself, included all of the libraries I needed... but then realized I forgot the freetype library. So I went back to my php-5.3.2 directory and ran ./configure '--with-free-type=/usr/local/lib' PHP did the configure fine, no errors. But when I run make: collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Error 1 Something that comes up frequently: /php-5.3.2/ext/libxml/libxml.c:336: undefined reference to `ts_resource_ex' /php-5.3.2/ext/sqlite3/sqlite3.c:663: undefined reference to `executor_globals_id' ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_final': /php-5.3.2/ext/sqlite3/sqlite3.c:811: undefined reference to `ts_resource_ex' ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_step': /php-5.3.2/ext/sqlite3/sqlite3.c:799: undefined reference to `ts_resource_ex' ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_func': /php-5.3.2/ext/sqlite3/sqlite3.c:788: undefined reference to `ts_resource_ex' ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_authorizer': /php-5.3.2/ext/sqlite3/sqlite3.c:1782: undefined reference to `ts_resource_ex' /php-5.3.2/ext/sqlite3/sqlite3.c:1787: undefined reference to `core_globals_id' ext/sqlite3/.libs/sqlite3.o: In function `zim_sqlite3_open': /php-5.3.2/ext/sqlite3/sqlite3.c:161: undefined reference to `core_globals_id' /php-5.3.2/ext/sqlite3/sqlite3.c:123: undefined reference to `core_globals_id' The undefined reference comes up for several things. So it fails here but it didn't when I initially compiled PHP. What's going on? Do I need to reconfigure the entire thing? Thanks in advance.

    Read the article

  • Missing a constant on load.. how can i get around this? (Rails::Plugin::OpenID)

    - by Chris Kimpton
    I have a Rails 2 project that I am trying to upgrade to Rails 3, but getting some issues with bundler. When I run "rake", it runs the tests just fine. But when I run "bundle exec rake" it fails to find a constant. The error is this: /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:131:in `const_missing': uninitialized constant Rails::Plugin::OpenID (NameError) from /Users/kimptoc/Documents/ruby/borisbikes/borisbikestats.pre3/vendor/plugins/open_id_authentication/init.rb:16:in `evaluate_init_rb' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:182:in `call' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:182:in `evaluate_method' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:166:in `call' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `run' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `each' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `send' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:90:in `run' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/activesupport-2.3.9/lib/active_support/callbacks.rb:276:in `run_callbacks' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/actionpack-2.3.9/lib/action_controller/dispatcher.rb:51:in `send' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/actionpack-2.3.9/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:631:in `prepare_dispatcher' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:185:in `process' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:113:in `send' from /Users/kimptoc/.rvm/gems/ruby-1.8.7-p330@p-borisbikestats-pre-rails3/gems/rails-2.3.9/lib/initializer.rb:113:in `run' from /Users/kimptoc/Documents/ruby/borisbikes/borisbikestats.pre3/config/environment.rb:9 from ./test/test_helper.rb:2:in `require' from ./test/test_helper.rb:2 I have these gems installed: $ gem list *** LOCAL GEMS *** actionmailer (2.3.9) actionpack (2.3.9) activerecord (2.3.9) activeresource (2.3.9) activesupport (2.3.9) authlogic (2.1.3) bundler (1.0.7) gravtastic (2.2.0) linecache (0.43) mocha (0.9.10) newrelic_rpm (2.13.4) parseexcel (0.5.2) rack (1.1.0) rack-openid (1.1.1) rails (2.3.9) rake (0.8.7) ruby-debug-base (0.10.5.jb2, 0.10.4) ruby-debug-ide (0.4.15) ruby-openid (2.1.8, 2.1.7, 2.0.4) sqlite3-ruby (1.3.2) The bundler Gemfile is as follows: source 'http://rubygems.org' #gem 'rails', '3.0.3' gem "rails", "2.3.9" gem "activesupport", "2.3.9" gem "ruby-openid", "2.1.7", :require => "openid" #gem "authlogic-oid", "1.0.4" # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'sqlite3-ruby', :require => 'sqlite3' gem "authlogic", "= 2.1.3" gem "newrelic_rpm" # gem "facebooker" gem "parseexcel" gem 'gravtastic', '= 2.2.0' gem "rack-openid", '=1.1.1', :require => 'rack/openid' # not sure what this does... gem "mocha" I have these plugins installed: 2dc_jqgrid authlogic_openid open_id_authentication squirrel I see these similar questions: Missing a constant on load.. how can i get around this? and Requiring gem in Rails 3 Controller failing with "Constant Missing" But their solutions dont seem to work for my situation. I am guessing the issue is around the plugins, but my ruby-foo is too weak. Thanks in advance, Chris

    Read the article

  • Which version of rails should I install with ruby 2.0.0 installed?

    - by Ekin Hazal
    Hi I am building a ROR development environment on a new computer with windows 7, now I have Ruby version 2.0.0 and Gems version 2.2.2 installed. Which version of Rails should I install? I saw this on rubyonrails.org/download : "We recommend Ruby 2.1.0 for use with Rails. We stopped supporting Ruby 1.8.x after Rails 3.2. Ruby 1.9.2+ will be supported until Rails 5." I will be working on a long-time project, I'm just trying to lessen the headaches I will have later. Right now, the latest Rails -v is 4.1.0 and they recommend Ruby 2.1.0 for use with Rails. I think the best option is to go with this set. Any other thoughts?

    Read the article

  • Why do I get "undefined method `destroy'" when including 'svn/repos'?

    - by Chad Johnson
    I get the following when running script/server require 'svn/repos' script/console Loading development environment (Rails 2.3.5) require 'svn/repos' /Library/Ruby/Site/1.8/svn/core.rb:88: warning: already initialized constant Stream /Library/Ruby/Site/1.8/svn/core.rb:138: warning: already initialized constant AuthBaton NoMethodError: undefined method destroy' for #<Svn::Ext::Core::Apr_pool_wrapper_t:0x10150ae68> from /Library/Ruby/Site/1.8/svn/util.rb:60:insvn_fs_initialize' from /Library/Ruby/Site/1.8/svn/util.rb:60:in call' from /Library/Ruby/Site/1.8/svn/util.rb:60:ininitialize' from /Library/Ruby/Site/1.8/svn/fs.rb:14 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:innew_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Site/1.8/svn/repos.rb:5 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:inrequire' from (irb):1 Any idea why?

    Read the article

  • Paperclip and tempfile with Rails

    - by Eric Koslow
    I'm trying to write a rails application where users can upload images, but Paperclip doesn't seem to be working for me. I've gone through all the basic steps (added has_attached_file, the migration, making the form multipart) but I keep getting the same error whenever I try uploading an image: can't convert nil into Integer Looking at the top of the stack ...rails3/lib/paperclip/processor.rb:46:in `sprintf' ...rails3/lib/paperclip/processor.rb:46:in `make_tmpname' .../ruby-1.9.2-head/lib/ruby/1.9.1/tmpdir.rb:154:in `create' .../ruby-1.9.2-head/lib/ruby/1.9.1/tempfile.rb:134:in `initialize' It seems the problem is in the tempfile. My code: _form.rb <%= form_for @high_school, :html => {:multipart => true} do |f| %> <%= f.error_messages %> ... <div class="field"> <%= f.file_field :photo %> </div> <div class="actions"> <%= f.submit %> </div> <% end %> model/high_school.rb ... validates_length_of :password, :minimum => 4, :allow_blank => true has_attached_file :photo has_many :students ... Is this a known problem? I basically followed the instructions from the github to the letter. My environment: Rails3 and Ruby 1.9.2dev Thank you!

    Read the article

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