Search Results

Search found 9835 results on 394 pages for 'ruby on rails3'.

Page 5/394 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Rails3 and Paperclip

    - by arkannia
    Hi, I have migrated my application from rails 2.3 to rails3 and i have a problem with paperclip. I saw there was a branch for rails3 on paperclip git. So I added "gem 'paperclip', :git = 'git://github.com/thoughtbot/paperclip.git', :branch = 'rails3'" into the Gemfile and launch the command bundle install. Once paperclip installed, the upload worked fine but not the styles. I saw a hack to fix it. # in lib/paperclip/attachment.rb at line 293 def callback which #:nodoc: # replace this line... # instance.run_callbacks(which, @queued_for_write){|result,obj| result == false } # with this: instance.run_callbacks(which, @queued_for_write) end The styles are ok after that, but i'm not able to active the processor. My code is : has_attached_file :image, :default_url => "/images/nopicture.jpg", :styles => { :large => "800x600>", :cropped => Proc.new { |instance| "#{instance.width}x#{instance.height}>" }, :crop => "300x300>" }, :processors => [:cropper] My processor is located in RAILS_APP/lib/paperclip_processors/cropper.rb and contains : module Paperclip class Cropper < Thumbnail def transformation_command if crop_command and !skip_crop? crop_command + super.sub(/ -crop \S+/, '') else super end end def crop_command target = @attachment.instance trans = ""; trans << " -crop #{target.crop_w}x#{target.crop_h}+#{target.crop_x}+#{target.crop_y}" if target.cropping? trans << " -resize \"#{target.width}x#{target.height}\"" trans end def skip_crop? ["800x600>", "300x300>"].include?(@target_geometry.to_s) end end end My problem is that i got this error message : uninitialized constant Paperclip::Cropper The cropped processor is not loaded. Is anybody has an idea to fix that ? For information my application works fine on rails 2.3.4.

    Read the article

  • deploying rails3 apps with bundler and phusion passenger: .bundle dir not found

    - by z3cko
    i am trying to deploy rails3 apps with the latest phusion passenger 2.2.11 and ruby-enterprise-1.8.7-2010.01. i am using bundler, but passenger seems to not be able to find the .bundle dir. error message: git://github.com/rails/rails.git (at master) is not checked out. Please run `bundle install` (Bundler::PathError) where do i install the .bundle? where do i tell passenger which bundle to use? any hints? thanks!

    Read the article

  • cache money ActiveRecord::MissingAttributeError

    - by R Jaswal
    Hi, i keep on getting ActiveRecord::MissingAttributeError errors randomly everywhere in my program. i have passenger (30 instances) running with nginx. i don't have this problem in dev. When i remove cache money it works fine in production. this is the error msg: ActiveRecord::MissingAttributeError (missing attribute: deposit_amount): lib/econveyance_pro/accounting/bsoa.rb:96:in collect_deposit' lib/econveyance_pro/accounting/bsoa.rb:24:incalculate' app/controllers/accounting_controller.rb:213:in calculate_buyer_file_accounting' app/controllers/accounting_controller.rb:175:ingenerate_accounting' app/controllers/accounting_controller.rb:153:in generate_accounting_and_save' lib/econveyance_pro/document_manager.rb:18:intemporary_tables_xml' lib/econveyance_pro/document_manager.rb:17:in each' lib/econveyance_pro/document_manager.rb:17:intemporary_tables_xml' app/controllers/document_manager_controller.rb:40:in xml' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/rack/request_handler.rb:92:inprocess_request' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_request_handler.rb:207:in main_loop' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/railz/application_spawner.rb:385:instart_request_handler' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/railz/application_spawner.rb:343:in handle_spawn_application' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/utils.rb:184:insafe_fork' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/railz/application_spawner.rb:341:in handle_spawn_application' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server.rb:352:insend' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server.rb:352:in main_loop' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server.rb:196:instart_synchronously' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server.rb:163:in start' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/railz/application_spawner.rb:209:instart' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/spawn_manager.rb:262:in spawn_rails_application' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server_collection.rb:126:inlookup_or_add' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/spawn_manager.rb:256:in spawn_rails_application' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server_collection.rb:80:insynchronize' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server_collection.rb:79:in synchronize' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/spawn_manager.rb:255:inspawn_rails_application' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/spawn_manager.rb:154:in spawn_application' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/spawn_manager.rb:287:inhandle_spawn_application' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server.rb:352:in __send__' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server.rb:352:inmain_loop' /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.8/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously' deposit_amount does exist in my db.

    Read the article

  • Ruby on Rails function grapher

    - by Hock
    Hi, I'm looking for a function grapher that I can use in a small Rails application I'm working on for my university. Is there anything out there? If it needs the values (points) is not a problem but it would be better if it just parsed the equation. The functions will be 100% in ruby format (for example Math.exp(3*x))... Thanks a lot! Nicolás Hock

    Read the article

  • error when running mysql2psql

    - by Mateo Acebedo
    I am trying to migrate a mysql database to a psql database, and after installing, I write the running command and instead of generationg the mysql2psql.yml file, this is what is being printed on my git bash window. $ mysql2psql c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': c annot load such file -- 2.0/mysql_api (LoadError) from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from c:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.8.1-x86-mingw32/lib/mys ql.rb:7:in `rescue in ' from c:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.8.1-x86-mingw32/lib/mys ql.rb:2:in `' from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from c:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2psql-0.1.0/lib/mysql2psql /mysql_reader.rb:1:in `' from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from c:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2psql-0.1.0/lib/mysql2psql .rb:5:in `' from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from c:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2psql-0.1.0/bin/mysql2psql :5:in `' from c:/Ruby200/bin/mysql2psql:23:in `load' from c:/Ruby200/bin/mysql2psql:23:in `' Any thoughts?

    Read the article

  • Installing MySQL-Ruby on Linux and Ruby 1.9.2

    - by Klam
    I am having an absurdly difficult time getting MySQL-Ruby to install on RedHat 4 using Ruby 1.9.2. I am behind a company proxy that prevents pretty much any package tool from connecting to external repositories so "gem install mysql" isn't going to cut it. I have tried installing the mysql-ruby gem locally but it fails with a mysterious: $gem install mysql-2.8.1.gem Building native extensions. This could take a while... ERROR: Error installing mysql-2.8.1.gem: ERROR: Failed to build gem native extension. /ns/local/apps/internal/SWS/MetricsPublisher/ruby/bin/ruby extconf.rb checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. I have also tried building the module myself by following the included readme. The results: $ruby extconf.rb --with-mysql-include=/path_to_my_sql_headers/mysql/include/ --with-mysql-lib=/path_to_my_sql_lib/mysql/lib/ checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Does anybody have any ideas? Quite frankly, I don't even care if MySQL-Ruby specifically works, I just want ANY means of connecting to a MySQL DB through a ruby call in ruby 1.9. Thanks.

    Read the article

  • Ruby on Rails simple_navigation Gem

    - by Paul
    I'm using the simple_navigation gem with RoR 2.3.5 It all seems to work correctly, I followed the info in the RDoc (seen here http://rdoc.info/projects/mexpolk/simple_navigation) However, when I actually render out the simple_navigation menu on my main application.html.erb file it escapes all of the html in it (multiple escapes actually). I end up with junk like this which in a browser ends up with all kinds of disjointed text and ["\ things everywhere. <ul class="simple_navigation" depth="0" id="simple_navigation_default"> ["<li class=\"menu\" drop_down=\"true\" id=\"simple_navigation_default_menus_home\"><a href=\"/home\">Wellcome</a><ul depth=\"1\" id=\"simple_navigation_default_menus_home_menus\"> [\"<li class=\\\"menu\\\" drop_down=\\\"false\\\" id=\\\"simple_navigation_default_menus_home_menus_settings\\\"><a href=\\\"/home/settings\\\">Appliction Settings</a></li>\"] </ul> </li>"] What am I doing wrong? Is there a way to tell Ruby on rails to NOT escape html?

    Read the article

  • ruby_threadptr_data_type error

    - by declan
    I'm starting up a new rails app with the latest version of rails (3.1.3). When I try to invoke the rails generator things get a little rough. First I fixed this bug, and now I'm getting this one /home/declan/.rvm/gems/ruby-1.9.3-p0@lcm/gems/ruby-debug-base19-0.11.25/lib/ruby- debug-base.rb:1:in `require': /home/declan/.rvm/gems/ruby-1.9.3-p0@lcm/gems/ruby- debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_threadptr_data_type - /home/declan/.rvm/gems/ruby-1.9.3-p0@lcm/gems/ruby-debug-base19-0.11.25 /lib/ruby_debug.so (LoadError) from /home/declan/.rvm/gems/ruby-1.9.3-p0@lcm/gems/ruby-debug-base19-0.11.25/lib/ ruby-debug-base.rb:1:in `<top (required)>' There's a discussion about this going on here, but I can't make enough sense of it to get things to work.

    Read the article

  • Ruby on Rails / Yellow Maps For Ruby Plugin woes...

    - by Zach
    Okay I've read through the plugin comments and the docs as well and I have yet to come up with an answer as to how to do this. Here's my problem I want to use the :info_window_tabs and the :icon option, but I don't know what format to pass my information in. According to the documentation the following code should be correct. Here's my code: @mapper.overlay_init(GMarker.new([map.lat, map.lng], :title => map.name, :info_window_tabs => [ {:tab => "HTML", :content => @marker_html}, {:tab => "Attachments", :content => "stuff"}], :icon => { :image => "../images/icon.png" })) The readme and documentation can be viewed here. And the relevant ruby file that I am trying to interact with, including the author's comments, can be viewed here. I have tried the #rubyonrails channel in IRC as well as emailing the author directly and reporting an issue at GitHub. It really is just a question of syntax. Thanks!

    Read the article

  • SOAP client generator for ruby/ruby on rails

    - by Sohan
    I have been looking for a fully functional WSDL client generator for ruby. I tried the one called wsdl2ruby and it didn't work. I think it has problems with detecting complex types correctly. Can someone point me to the right library if there is one? I am specifically looking to generate a full functional client for SOAP API provided by jira. I looked into jira4r but it seems to be dead now and not up to date. Any help is much appreciated. Thank you.

    Read the article

  • Ruby Iconv works with irb and ruby debugger but not in a unit test

    - by Mark B
    I'm running Ruby 1.8.7 with Rails 2.3.5 on Ubuntu 10.04 64-bit. I've written a method that should take a string like this, "École À la Découverte" and output a file-system name like this "ecole_a_la_decouverte": (Iconv.new('US-ASCII//TRANSLIT', 'utf-8').iconv "École À la Découverte").gsub(/[^\w\s-\—]/,'').gsub(/[^\w]|[_]/,' ').split.join('_').downcase When I test this line in my code, the test always fails saying that "cole_la_dcouverte" is unequal to "ecole_a_la_decouverte". The odd thing is that if I insert a debugger line and use the debugger console the test passes. As well, running this line manually in irb seems to work. Does anyone know what's going on and why this test is failing? My only thought is that including the debugger or irb somehow adds more support for UTF-8 but I'm at a loss to figure out where to go next. Thanks in advance!

    Read the article

  • Ruby (Rack) application could not be started - Passenger (3.0.9) error for rails 3.1.0 app on ubuntu and nginx (1.0.6) after deploying

    - by user938363
    Here is the error saying bcrypt was not loaded. The rails app is not using the Devise for authentication and gem bcrypt is not in Gemfile. Sometime, the webserver throws out the error saying spawn server can not start. gem list shows that both bcrypt-ruby 3.0.1 and 3.0.0 were installed. Ruby (Rack) application could not be started A source file that the application requires, is missing. * It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded. * A required library may not installed. Please install all libraries that this application requires. Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem. Error message: no such file to load -- bcrypt Exception class: LoadError Application root: /vol/www/emclab/current Backtrace: # File Line Location 0 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/dependencies.rb 240 in `require' 1 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/dependencies.rb 240 in `block in require' 2 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/dependencies.rb 225 in `load_dependency' 3 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/dependencies.rb 240 in `require' 4 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activemodel-3.1.0/lib/active_model/secure_password.rb 1 in `' 5 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/base.rb 2160 in `block in ' 6 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/base.rb 2140 in `class_eval' 7 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/base.rb 2140 in `' 8 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/base.rb 31 in `' 9 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/session_store.rb 77 in `' 10 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/session_store.rb 51 in `' 11 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/session_store.rb 1 in `' 12 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/application/configuration.rb 123 in `session_store' 13 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/application.rb 168 in `block in default_middleware_stack' 14 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/application.rb 142 in `tap' 15 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/application.rb 142 in `default_middleware_stack' 16 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/engine.rb 445 in `app' 17 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/application/finisher.rb 37 in `block in ' 18 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/initializable.rb 25 in `instance_exec' 19 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/initializable.rb 25 in `run' 20 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/initializable.rb 50 in `block in run_initializers' 21 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/initializable.rb 49 in `each' 22 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/initializable.rb 49 in `run_initializers' 23 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/application.rb 92 in `initialize!' 24 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/railtie/configurable.rb 30 in `method_missing' 25 /vol/www/emclab/releases/20111115184804/config/environment.rb 5 in `' 26 config.ru 3 in `require' 27 config.ru 3 in `block in ' 28 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/rack-1.3.2/lib/rack/builder.rb 51 in `instance_eval' 29 /vol/www/emclab/shared/bundle/ruby/1.9.1/gems/rack-1.3.2/lib/rack/builder.rb 51 in `initialize' 30 config.ru 1 in `new' 31 config.ru 1 in `' 32 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb 222 in `eval' 33 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb 222 in `load_rack_app' 34 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb 156 in `block in initialize_server' 35 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/utils.rb 572 in `report_app_init_status' 36 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb 153 in `initialize_server' 37 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously' 38 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb 180 in `start' 39 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb 128 in `start' 40 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 253 in `block (2 levels) in spawn_rack_application' 41 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add' 42 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 246 in `block in spawn_rack_application' 43 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb 82 in `block in synchronize' 44 prelude> 10:in `synchronize' 45 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize' 46 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application' 47 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application' 48 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application' 49 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop' 50 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously' 51 /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/helper-scripts/passenger-spawn-server 99 in `' cap deploy:check returns: You appear to have all necessary dependencies installed Any thoughts about the problem? thanks!

    Read the article

  • Python and Ruby in Tuxedo

    - by Maurice Gamanho
    With the release of SALT 11gR1, you can now develop Python/Ruby services/applications on Oracle Tuxedo platform. Python functions or Ruby classes can be invoked as Tuxedo services by other Tuxedo services or clients and, in addition, Python/Ruby applications can invoke existing Tuxedo services. SALT 11gR1 combines the proven scalability, reliability and performance of the Tuxedo runtime infrastructure with the agility provided by these dynamic scripting languages, providing a highly available and almost linearly scalable platform for Python and Ruby application development. Another benefit of developing Python and Ruby applications with Tuxedo is that services are SOA enabled from inception by virtue of Tuxedo's comprehensive integration options with J2EE app servers, mainframe applications, Web services, etc. Other interesting features are dynamic re-loading of scripts, where script changes are picked up automatically or when the administrator decides, and server-side typing, where Python functions and Ruby classes are given interfaces by way of the Tuxedo Metadata Repository. More information can be found on the Oracle SALT 11gR1 documentation page. See also SCA Python and Ruby Programming and Python and Ruby Data Type Mapping.

    Read the article

  • Android -> Ruby Server Interface -> Mongodb

    - by MRabRabbit
    I've been wrecking my brain about this for a few days. I'll run my scenario by you and hopefully you can help me. In my head this is how it goes: I have an Android App. I want my Android App to make (function) calls to a MongoDB database via a Ruby Interface on the Server. e.g. Android app sends a HTTP GET ? with the function name, let's say getFriends for this user Ruby Interface receives this request from the app, grabs a thread from a thread pool and calls the appropriate function call implemented in Ruby, to the Mongodb. Ruby Interface gets results from Mongodb and sends a HTML POST to the Android app. So that's how I think it works. I know about the ruby driver for mongo db, and interacting with the mongodb from ruby but, how do I make a ruby back end listen for incoming messages and should these messages be done through sockets or a http interface ala Net::http in ruby?

    Read the article

  • Ruby on Rails free books

    - by Madhan ayyasamy
    The following links has ruby on rails tutorials, you can download directly from there website, its fully free of cost..:)Beginning Ruby: From Novice to Professional Building Dynamic Web 2.0 Websites with Ruby on RailsRuby on Rails For DummiesAgile Web Development with RailsThe Ruby Way: Solutions and Techniques in Ruby ProgrammingBeginning Ruby on RailsRails RecipesRails CookbookAjax on RailsThe Art of Rails Programmer to Programmer

    Read the article

  • How can I move from Java and ColdFusion to Ruby on Rails?

    - by Ciaran Archer
    Currently I work with ColdFusion 9+ and some Java in a Windows environment. Prior to ColdFusion, my background was in Java and JSP. I'm considering a move towards Ruby on Rails, as I think it would be a real challenge, keep things fresh, and provide more job opportunities. In order to get into it, I started to build my personal website in Rails 3.0. But what else can I do to make this transition from what I know now to Ruby and Rails? Are there specific or idiomatic aspects of Ruby or Rails I should keep in mind when switching over from a ColdFusion and Java mindset?

    Read the article

  • Error handling in Rails Controller for adding embedded Mongoid documents to Model

    - by Dragonfly
    I have a Item model that has embedded documents. Currently, the following comments_controller code will add a comment to the item successfully. However, if pushing the comment document onto the comments array on item fails, I will not know this. #this does work, but i do not know if the push fails def create comment = Comment.new(:text => params[:text]) @item.comments << comment render :text => comment end I would like to have something like this, but @item.comments << comment does not return true or false: #this does not work def create comment = Comment.new(:text => params[:text]) if @item.comments << comment render :text => comment else render :text => 'oh no' end end Nor does it throw an exception when the document push fails: #this does not work def create begin comment = Comment.new(:text => params[:text]) @item.comments << comment render :text => comment rescue Exception => e render :text => 'oh no' end end Thanks!

    Read the article

  • Is it possible to use best_in_place with typeahead from twitter bootstrap?

    - by Dave H
    Basically, I am using best_in_place in my rails webapp to let users edit their profile info in place. The thing is, I would like users to be presented with a typeahead form for certain entries.. Here's what I'm working with: <p>College/University: <input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="8" data-source='["University of Pennsylvania","Harvard","Yale","Princeton","Cornell","Brown","Columbia","Dartmouth"]'></p> This gives me a working form box with typeahead. However, I want to be able to wrap this in best_in_place with something like <%= best_in_place @student, :education %> so that users only see the typeahead form when they click on the text, and upon clicking away from the box or hitting enter the selection is stored in the database. Is there a reasonably easy way to do this?

    Read the article

  • Find which alias method is called in rails model

    - by Kashif Umair Liaqat
    I am new to rails development. I have created some aliases to a method and I want to know that which alias is called. I have this code. alias_method :net_stock_quantity_equals :net_stock_quantity alias_method :net_stock_quantity_gte :net_stock_quantity alias_method :net_stock_quantity_lte :net_stock_quantity alias_method :net_stock_quantity_gt :net_stock_quantity alias_method :net_stock_quantity_lt :net_stock_quantity def net_stock_quantity #some code here end I want to know that user has called which alias. Like if user calls net_stock_quantity_equals then I should know that the user has called net_stock_quantity_equals not net_stock_quantity. Any help would be appreciated.

    Read the article

  • RoR | how to get content_tags to nest?

    - by Digital Cake
    As you can see I have a helper with a method that I'm trying to render out to the view. The nested content_tags do not render what is my disconnect about this tag? def draw_calendar(selected_month, month, current_date) content_tag(:table) do content_tag(:thead) do content_tag(:tr) do I18n.t(:"date.abbr_day_names").map{ |day| content_tag(:th, day, :escape => false) } end #content_tag :tr end #content_tag :thead content_tag(:tbody) do month.collect do |week| content_tag(:tr, :class => "week") do week.collect do |date| content_tag(:td, :class => "day") do content_tag(:div, date.day, :class => (Date.today == current_date ? "today" : nil)) end #content_tag :td end #week.collect end #content_tag :tr end #month.collect end #content_tag :tbody end #content_tag :table end #draw_calendar

    Read the article

  • Puppet and Vim fighting over Ruby version

    - by devians
    I have installed puppet from the .dmg from puppetlabs. If I remove ruby 1.9.3, puppet works, but other things like my vim install (dependant plugins) do not. According to http://docs.puppetlabs.com/guides/platforms.html#ruby-versions 1.9.3 is supported. So whats going wrong with puppet? % uname -a Darwin Kusanagi.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 % which ruby /usr/local/bin/ruby % ruby --version ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2] % /usr/bin/ruby --version ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0] % brew info ruby 1 ? ruby: stable 1.9.3-p327, HEAD http://www.ruby-lang.org/en/ Depends on: pkg-config, readline, gdbm, libyaml /usr/local/Cellar/ruby/1.9.3-p327 (796 files, 17M) * https://github.com/mxcl/homebrew/commits/master/Library/Formula/ruby.rb ==> Options --with-tcltk Install with Tcl/Tk support --with-suffix Suffix commands with "19" --universal Build a universal binary --with-doc Install documentation ==> Caveats NOTE: By default, gem installed binaries will be placed into: /usr/local/Cellar/ruby/1.9.3-p327/bin You may want to add this to your PATH. % puppet /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- puppet/util/command_line (LoadError) from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /usr/bin/puppet:3:in `<main>'

    Read the article

  • Using amCharts in Ruby on Rails

    - by Dexter
    I have followed this tutorial in order to use amChart and it worked with no problems , now I am trying to generate a chart with amCharts to show each user and the sign in count but i cant make it work because it not getting the data correctly, what i am missing here ? how can i show user email and sign_in_count ? Users_controller.rb class UsersController < ApplicationController load_and_authorize_resource def index @users = User.all respond_to do |format| format.html # index.html.erb format.json { render :json => @users } end end def show @user = User.find(params[:id]) end def new @user = User.new end def create @user = User.new(params[:user]) if @user.save flash[:notice] = 'A new user created successfully.' redirect_to users_path else flash[:error] = 'An error occurred please try again!' redirect_to users_path end end def edit @user = User.find(params[:id]) end def update @user = User.find(params[:id]) if @user.update_attributes(params[:user]) flash[:notice] = 'Profile updated' redirect_to users_path else render 'edit' end end def destroy @user = User.find(params[:id]) if current_user == (@user) flash[:error] = "Admin suicide warning: Can't delete yourself." else @user.destroy flash[:notice] = 'User deleted' redirect_to users_path end end def checkname if User.where('user_name = ?', params[:user]).count == 0 render :nothing => true, :status => 200 else render :nothing => true, :status => 409 end return end end Users_helper.rb module UsersHelper def convert_to_amcharts_json(data_array) data_array.to_json.gsub(/\"text\"/, "text").html_safe end end index.html.erb <div id="chartdiv" style="width: 100%; height: 400px;"></div> <script type="text/javascript"> var chart; var chartData = <%= convert_to_amcharts_json(@users) %>; AmCharts.ready(function () { // SERIAL CHART chart = new AmCharts.AmSerialChart(); chart.dataProvider = chartData; chart.categoryField = "email"; // the following two lines makes chart 3D chart.depth3D = 20; chart.angle = 30; // AXES // category var categoryAxis = chart.categoryAxis; categoryAxis.labelRotation = 90; categoryAxis.dashLength = 5; categoryAxis.gridPosition = "start"; // value var valueAxis = new AmCharts.ValueAxis(); valueAxis.title = "Most Active users"; valueAxis.dashLength = 5; chart.addValueAxis(valueAxis); // GRAPH var graph = new AmCharts.AmGraph(); graph.valueField = "sign_in_count"; graph.colorField = "color"; graph.balloonText = "<span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>"; graph.type = "column"; graph.lineAlpha = 0; graph.fillAlphas = 1; chart.addGraph(graph); // CURSOR var chartCursor = new AmCharts.ChartCursor(); chartCursor.cursorAlpha = 0; chartCursor.zoomable = false; chartCursor.categoryBalloonEnabled = false; chart.addChartCursor(chartCursor); // WRITE chart.write("chartdiv"); }); </script>

    Read the article

  • Is there a rails3-compatible emacs mode yet ?

    - by julien
    Rinari hasn't been updated in the last few months, and there doesn't seem to be such progress made in the branches on github. I've never tried emacs-rails, but from what I can see, the same applies. So, is there a rails mode somewhere that's compatible with v3 ?

    Read the article

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