Search Results

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

Page 12/410 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • What does the * symbol do near a function argument and how to use that in others scenarios?

    - by user502052
    I am using Ruby on Rails 3 and I would like to know what means the presence of a *simbol near a function argument and to understand its usages in others scenarios. Example scenario (this method was from the Ruby on Rails 3 framework: def find(*args) return to_a.find { |*block_args| yield(*block_args) } if block_given? options = args.extract_options! if options.present? apply_finder_options(options).find(*args) else case args.first when :first, :last, :all send(args.first) else find_with_ids(*args) end end end

    Read the article

  • Problem in Rail Casts Episode 190

    - by Gautam
    Hello, This is the code I have written require 'rubygems' require 'nokogiri' require 'open-uri' url = "http://timesofindia.indiatimes.com/rssfeeds/-2128838597.cms" doc = Nokogiri::HTML(open(url)) puts doc.at_css("title").text and I am getting this output. I have installed Nokogiri. I use Windows 7 C:\Ruby>ruby hello.rb C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri/nokogiri.rb:1:in `require': 127: The specified procedure could not be found. - Init_nokogiri (LoadError) C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri/1.9/nokogiri.so from C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri/nokogiri.rb:1:in `<top (required)>' from C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri.rb:13:in `require' from C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri.rb:13:in `<top (required)>' from hello.rb:2:in `require' from hello.rb:2:in `<main>'

    Read the article

  • SQLite3 Integer Max Value

    - by peterwkc
    Hello to all, what is the maximum value of data type INTEGER in sqlite3 ? How do you store ip address in database ? What is attached ? How to create table which belongs to a specific database using sql ddl? What is this error about ? error while the list of system catalogue : no such table: temp.sqlite_master Unable to execute statement Does sqlite3 text data type supoports unicode? Thanks.

    Read the article

  • How do I check SQLite3 syntax?

    - by Benjamin Oakes
    Is there a way to check the syntax of a SQLite3 script without running it? Basically, I'm looking for the SQLite3 equivalent of ruby -c script.rb, perl -c script.pl, php --syntax-check script.php, etc. I've thought of using explain, but most of the scripts I'd like to check are kept around for reference purposes (and don't necessarily have an associated database). Using explain would also make it hard to use with something like Syntastic. (That is, I'm only wanting to check syntax, not semantics.)

    Read the article

  • EXTRACT for TIMESTAMP types in SQLite3

    - by umuthorax
    Hi, It seems extract function is not supported by SQLite3 for timestamp types (ref). For example; select extract(year from l_shipdate) as l_year from ... gives the following error; Error: near "from": syntax error I wonder whether there is an alternative way to do this in SQLite3 (or through rewriting the SQL query). Thanks in advance,

    Read the article

  • Build a ruby daemon that integrates my rails environement

    - by jjmartres
    Hi guys, I need to build a ruby daemon that will use the freeswitcher eventmachine library for freeswitch. Since few days I as looking the web for the best solution to build a ruby daemon that will integrate my rails environment, specailly my active record models. I've take a look to the excellent Ryan Bates screencast (episodes 129 custom daemon) but I'm not sure that is still an actual solution. Does anyone known a good way to do that ? Thanks all for your help.

    Read the article

  • How to install curl on windows for ruby on rails

    - by Gautam
    Hi, I am new to ruby on rails. Could you please help me to install curl. I have windows 7 and ruby 1.8.7 I need to install Paul Dix's FeedZirra. I need curl for that. Also could you help me with gem install curb. Even curb seems to need Curl Looking forward for your help Thank You Gautam

    Read the article

  • when executing Powershell Script from Ruby "Can't convert true into String" error

    - by Ozie Harb
    I am trying to execute a powershell script from Ruby, I have entered the below command: scriptPath = system('powershell \"C:\\Scripts\\DB_Setup.ps1\"') The ruby Script is handling exceptions when an error is raised to stop the script as below command: rescue => ex message = "\nscript on server '#{`hostname`.strip()}' terminated unexpectedly:\n\nMessage: '#{ex.message}" raise ex Output Error: script on server 'TestDB1' terminated unexpectedly: Message: 'can't convert true into String' Thanks

    Read the article

  • Ruby generic filesystem libraries

    - by webdestroya
    I am looking for a "Virtual File System" type library for ruby. I want to be able to have a completely generic file system that I can easily switch between using Local files and using S3 or using FTP or something like that. (Identical to VFS for Java) Has anybody used any type of generic file system for ruby (I just need it to support local files and Amazon S3) Any pointers would be much appreciated.

    Read the article

  • Who's using Ruby on Rails in production?

    - by Jekke
    I've been kicking around Ruby and the rails framework and have been considering recommending to a client-of-a-client that they use it to rebuild their site, which is currently built in very bad ASP classic that will have to be rewritten from the ground up regardless of what technology is used. One thing I'm missing from my pitch is a list of major sites using Ruby-on-Rails. Are there any yet?

    Read the article

  • Parametrized get request in Ruby?

    - by Horace Loeb
    How do I make an HTTP GET request with parameters in Ruby? It's easy to do when you're POSTing: require 'net/http' require 'uri' HTTP.post_form URI.parse('http://www.example.com/search.cgi'), { "q" => "ruby", "max" => "50" } But I see now way of passing GET parameters as a hash using net/http.

    Read the article

  • Convert SQL query to Ruby help

    - by Verloren
    Hey all, I need to query my database table to find which employee has the most support tickets related to them. I can do this just fine using this MySQL query: SELECT employee_id, COUNT(id) AS number_of_tickets FROM tickets GROUP BY employee_id ORDER BY number_of_tickets DESC LIMIT 1; How would write this in Ruby-on-Rails? Thanks very much for your assistance. I use Ruby version 1.8.6, Rails version 2.2.2 and MySQL Server version 5.0.

    Read the article

  • Mavericks system Ruby and gem broken

    - by T1000
    When I tried to run ruby -v or gem -v (or any other command), I get: dyld: lazy symbol binding failed: Symbol not found: _ruby_run Referenced from: /usr/local/bin/ruby Expected in: /usr/lib/libruby.dylib dyld: Symbol not found: _ruby_run Referenced from: /usr/local/bin/ruby Expected in: /usr/lib/libruby.dylib This is after I ran rvm system to temporally switch to the system default Ruby. RVM is working fine, but I have a special need to install a gem to the system Ruby and I can't because of this problem. Does anyone know why? It seems to be some kind of link problem to Ruby, but I'm don't know how to solve this. I ran which ruby and it's at this point located in "/usr/local/bin/ruby". I checked the Ruby in "/usr/lib/" and it's pointing to my system Ruby: "../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby" Any help would be appreciated.

    Read the article

  • Ruby on rails: Staring mongrel server

    - by spin-docta
    I know mongrel is the default server for "script/server" but when I do that command I get webrick. (I had it working before with mongrel). Now when I tell is to use mongrel ("script/server mongrel") the server fails to start up in the terminal. I get this: $ script/server mongrel ^C/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel/gems.rb:11:in `require': Interrupt from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:17 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require' from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:1 from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `const_get' from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get' from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `each' from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get' from /Users/devinross14/.gem/ruby/1.8/gems/rails-2.3.3/lib/commands/server.rb:45 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:in `require' from script/server:3 I just upgraded to snow leopard if that helps...

    Read the article

  • Migrating Ruby Site from EngineYard to Heroku

    - by user410925
    As part of a larger project I've been tasked with migrating some existing Ruby on Rails sites (built with an old version of refinerycms 0.9.6.34, at least that's the version listed in the Gemfile included with the source). I don't normally work with Ruby so I'm at a bit of a loss. The previous developers simply handed over the latest git dump as well as a db dump. I'm working first with trying to get the site up working locally on an Ubuntu 11.10 local machine before pushing up to at test Heroku install. If it's possible to just push directly to Heroku with the files they gave, then I can try that, but it's my understanding I need to get everything working and then use Heroku's tools to deploy. The previous devs said they're using ruby 1.8.7 so in Ubuntu I've done the following: aptitude install ruby1.8 ruby1.8-dev ruby1.8-full aptitude install rubygems1.8 I've restored the database and in the config directory I've made changes to the database.yml to point to the restored database. When I try and run "bundle install" from the root of the extracted source dir I get: Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z" Fetching gem metadata from https://rubygems.org/....... Fetching gem metadata from https://rubygems.org/.. Using rake (0.9.2.2) Using i18n (0.6.0) Using multi_json (1.3.6) Using activesupport (3.2.3) Using builder (3.0.0) Using activemodel (3.2.3) Using erubis (2.7.0) Using journey (1.0.3) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.1) Using hike (1.2.1) Installing tilt (1.3.3) Using sprockets (2.1.3) Using actionpack (3.2.3) Installing mime-types (1.18) Using polyglot (0.3.3) Using treetop (1.4.10) Installing mail (2.4.4) Using actionmailer (3.2.3) Using arel (3.0.2) Using tzinfo (0.3.33) Using activerecord (3.2.3) Using activeresource (3.2.3) Using acts_as_indexed (0.7.8) Using awesome_nested_set (2.1.3) Using babosa (0.3.7) Using bcrypt-ruby (3.0.1) Using coffee-script-source (1.3.3) Using execjs (1.4.0) Using coffee-script (2.2.0) Using rack-ssl (1.3.2) Using json (1.7.3) Using rdoc (3.12) Using thor (0.14.6) Using railties (3.2.3) Using coffee-rails (3.2.2) Using orm_adapter (0.0.7) Using warden (1.1.1) Using devise (2.0.4) Using dragonfly (0.9.12) Using friendly_id (4.0.6) Using paper_trail (2.6.3) Using globalize3 (0.2.0) Installing jquery-rails (2.0.2) Using bundler (1.1.4) Using rails (3.2.3) Using sass (3.1.19) Installing sass-rails (3.2.5) Using truncate_html (0.5.5) Using uglifier (1.2.4) Using will_paginate (3.0.3) Using refinerycms-core (2.0.4) Using refinerycms-authentication (2.0.4) Using refinerycms-dashboard (2.0.4) Using refinerycms-images (2.0.4) Using seo_meta (1.3.0) Using refinerycms-pages (2.0.4) Using refinerycms-resources (2.0.4) Using refinerycms (2.0.4) Using routing-filter (0.3.1) Using refinerycms-i18n (2.0.0) Using sqlite3 (1.3.6) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. Obviously the errors with Invalid gemspec need to be resolved, but the other thing that's troubling to me are the lines: Using refinerycms-core (2.0.4) Using refinerycms-authentication (2.0.4) Using refinerycms-dashboard (2.0.4) Using refinerycms-images (2.0.4) Using seo_meta (1.3.0) Using refinerycms-pages (2.0.4) Using refinerycms-resources (2.0.4) Using refinerycms (2.0.4) Using routing-filter (0.3.1) Using refinerycms-i18n (2.0.0) Since the refinerycms version listed in the Gemfile was 0.9.6.34. When it comes to the Ruby world, I'm a bit lost so any help would be greatly appreciated. Thanks,

    Read the article

  • Ruby or Rails reporting tools?

    - by Anushank
    I am looking for a report generation tool in ruby or rails which allows the user to define a template, then fetch data into the created template. I have been looking through "The Ruby Box: reporting section." There are two reporting tools I have looked at: Thin Reports: It is really good. You can create your own report template with the template editor. Then you can produce PDF reports using thinreports gems. ODF Report: You can create a template ODF file using Open Office and MS Word, and you can use that template to generate the report. Both of these solutions lack the ability to draw charts. Does anyone know of similar reporting tools that can draw charts within a given report? I have tried the RTF Ruby Library. It works, but shares the limitation that it cannot draw charts and graphs. The minimum requirements are: Able to create customizable templates. (e.g. design layout, set font size, color, embed images etc.) Able to draw tables and charts. Template could be in Docx or excel or xml or any other common file format. Report output report must be in Docx or RTF format. Thanks

    Read the article

  • Rails app Hangs and Ruby uses 100% CPU

    - by tuzzolotron
    I have an apache2 server running Phusion Passenger. On this machine I have two virtual hosts setup each look like this (path's are different for the 2nd virtualhost...but other directives are the same) ServerName beta.mysite.us DocumentRoot "/var/www/beta/mysite/public" <Directory "/var/www/beta/mysite/public"> RewriteEngine on AllowOverride All Options FollowSymLinks </Directory> # http://www.modrails.com/documentation/Users guide.html PassengerAppRoot "/var/www/beta/mysite" RailsEnv development PassengerMaxPoolSize 6 PassengerDefaultUser mysite # PassengerHighPerformance does come at a trade off of lack of support for mod_rewrite PassengerHighPerformance off RailsSpawnMethod conservative RailsFrameworkSpawnerIdleTime 0 RailsAppSpawnerIdleTime 0 PassengerPoolIdleTime 300 ErrorLog "/var/log/httpd/mysite-beta-error_log" CustomLog "/var/log/httpd/mysite-beta-access_log" common Apache starts fine. I can go to one of the virtualhosts and it will load Rails and work. When I go to the second virtualhost, a ruby process spawns ("Rails: /var/www/mysite/current" according to ps awuxf) and uses 100% CPU. This process never exits. At this point neither virtualhost is responsive. If I kill the the offending ruby process, another ruby process replaces it and uses 100% cpu. If I kill these processes about 5-6 times, then both virtualhosts respond but they, are somehow, running the same Rails app?! I have another virtualhost on this machine that is not setup with phusion passenger..This one never exhibits any problems. Any help / ideas would be much appreciated!

    Read the article

  • Installtion problems in ruby

    - by user26202
    Hello , I had ruby in my Red hat linux pc. I manually deleted the folders of ruby in /usr/lib and /usr/bin. Now when I try to install ruby again it says it conflicts with some files which does not exist. rpm -i ruby-libs-1.8.6.111-1.i386.rpm th file from package ruby-libs-1.8.5-5.el5 file /usr/lib/ruby/1.8/yaml/tag.rb from install of ruby-libs-1.8.6.111-1 conflicts with file from package ruby-libs-1.8.5-5.el5 What should I do now ?Can someone guide me. Regards, Mithun

    Read the article

  • Sqlite3 prompting `...>` instead of `sqlite>`

    - by Imray
    I'm following a beginners tutorial to sqlite3. The first step is creating a new database. So I enter a name (movies.db). I'm expecting to get another sqlite> prompt on the next line, and continue with the tutorial, but instead I get a lame ...> after which I can type any gibbersish I want. Clearly, this is not good. What my command prompt looks like: SQLite version 3.8.1 2013-10-17 12:57:35 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> $ sqlite3 movies.db ...> gibberish ...> dsds ...> sdada ...> gfgys ...> a ...> Aaaaarrrgh! ...> How do I get sqlite3 to work normally for me? Pardon my newbie-ness. I hope I've phrased this question in a way that might help other newbs too.

    Read the article

  • Ruby freelancing: realistic expectations?

    - by Sophie
    Hi guys, I'm in a situation where I only need $100 to live at a place. How is this relevant to programming? Well, I would like to hear the opinions of those on this site if it is at all realistic to expect a Ruby noobie to be able to make $100 freelancing by a month from now, assuming a great deal of effort and enthusiasm o_O I'm a complete noob to programming ;d, learning Ruby before Rails. (I also asked this on StackOverflow, but want lots of answers so .<)

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >