Search Results

Search found 943 results on 38 pages for 'gems'.

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

  • How to configure installed Ruby and gems?

    - by NARKOZ
    My current gem env returns: RubyGems Environment: - RUBYGEMS VERSION: 1.3.6 - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] - INSTALLATION DIRECTORY: /home/USERNAME/.gems - RUBYGEMS PREFIX: /home/narkoz - RUBY EXECUTABLE: /usr/bin/ruby1.8 - EXECUTABLE DIRECTORY: /home/USERNAME/.gems/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-linux - GEM PATHS: - /home/USERNAME/.gems - /usr/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - "gempath" => ["/home/USERNAME/.gems", "/usr/lib/ruby/gems/1.8"] - "gemhome" => "/home/USERNAME/.gems" - REMOTE SOURCES: - http://rubygems.org/ How can I change path /home/USERNAME/ to my own without uninstalling? OS: Debian Linux

    Read the article

  • no such file to load -- for several gems unpacked in a Rails 2.3.8 app

    - by vincentp
    Hi, I unpacked several gems into the /vendor/gems folder, and I get the same error message for 5 of these gems when I try to start my Rails application. The date-performance one as an example : no such file to load -- date_performance.so /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in' /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' /path_to_my_app/vendor/gems/date-performance-0.4.8/lib/date/performance.rb:34 ... Here is the line 34 : require 'date_performance.so' I'm including the gem using the following code : config.gem "date-performance", :lib => "date/performance" The '.so' file is under /path_to_my_app/vendor/gems/date-performance-0.4.8/lib/ Any idea on why things were working while the gems were not unpacked? Do you have any idea about this behavior? I'm using : Rails 2.3.8 REE 1.8.7 gem 1.3.6 Mac OS X Thanks! Vincent

    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

  • Problem with activesupport ruby 1.91 and rake

    - by Richard
    I have an installation of ruby 1.9.1 ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] when I try and run a rake task I am getting an error: rake aborted! no such file to load -- ftools C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `block in require' C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' C:/Data/Checkouts/mvc2/Cms3/tools/rake/tasks.rb:4:in `<top (required)>' C:/Data/Checkouts/mvc2/stonewarehouse/Rakefile.rb:5:in `require' C:/Data/Checkouts/mvc2/stonewarehouse/Rakefile.rb:5:in `<top (required)>' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `load' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2017:in `block in load_rakefile' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2000:in `block in run' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>' C:/Ruby/bin/rake:19:in `load' C:/Ruby/bin/rake:19:in `<main>' any suggestions would be appreciated. thanks.

    Read the article

  • Server won't start on using authlogic-oauth2

    - by Yahoo-Me
    I have included oauth2 and authlogic-oauth2 in the gemfile as I want to use them and am trying to start the server. It doesn't start and gives me the error: /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails.rb:44:in `configuration': undefined method `config' for nil:NilClass (NoMethodError) from /Library/Ruby/Gems/1.8/gems/authlogic_oauth2-1.1.2/lib/authlogic_oauth2.rb:14 from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in `require' from /Users/arkidmitra/Documents/qorm_bzar/buyzaar/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:28:in `require' from /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:28 from /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:27:in `tap' from /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:27 from script/rails:6:in `require' from script/rails:6 I am using Rails 3.0.3 and Ruby 1.8.7. Also the sever seems to be starting fine till I add gem "authlogic-oauth2" to the Gemfile.

    Read the article

  • Wierd Haml 3 error with ruby 1.9.1 and rails 3

    - by Micke
    I'm getting this wierd error on my windows 7 computer when i am using the html2haml command with Haml 3 and Rails on ruby 1.9: -- control frame ---------- c:0017 p:-9593720 s:0052 b:0052 l:000051 d:000051 TOP c:0016 p:---- s:0050 b:0050 l:000049 d:000049 CFUNC :require c:0015 p:0026 s:0046 b:0046 l:000045 d:000045 TOP C:/Ruby/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2-x86-mswin32/lib/hpricot.rb:20 c:0014 p:---- s:0044 b:0044 l:000043 d:000043 FINISH c:0013 p:---- s:0042 b:0042 l:000041 d:000041 CFUNC :require c:0012 p:0095 s:0038 b:0038 l:000037 d:000037 TOP C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/html.rb:101 c:0011 p:---- s:0036 b:0036 l:000035 d:000035 FINISH c:0010 p:---- s:0034 b:0034 l:000033 d:000033 CFUNC :require c:0009 p:0022 s:0030 b:0030 l:000029 d:000029 METHOD C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:559 c:0008 p:0050 s:0023 b:0023 l:000022 d:000022 METHOD C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:41 c:0007 p:0013 s:0020 b:0020 l:000019 d:000019 METHOD C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:22 c:0006 p:0078 s:0016 b:0016 l:000015 d:000015 TOP C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/bin/html2haml:7 c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :load c:0003 p:0127 s:0007 b:0007 l:000e54 d:0020c0 EVAL C:/Ruby/bin/html2haml:19 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:000e54 d:000e54 TOP --------------------------- -- Ruby level backtrace information----------------------------------------- C:/Ruby/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2-x86-mswin32/lib/hpricot.rb:20:in `require' C:/Ruby/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2-x86-mswin32/lib/hpricot.rb:20:in `<top (required)>' C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/html.rb:101:in `require' C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/html.rb:101:in `<top (required)>' C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:559:in `require' C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:559:in `process_result' C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:41:in `parse' C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/lib/haml/exec.rb:22:in `parse!' C:/Ruby/lib/ruby/gems/1.9.1/gems/haml-3.0.0/bin/html2haml:7:in `<top (required)>' C:/Ruby/bin/html2haml:19:in `load' C:/Ruby/bin/html2haml:19:in `<main>' [NOTE] You may encounter a bug of Ruby interpreter. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. And then ruby crashes. I have reinstalled all the gems but nothing will help. Please help me

    Read the article

  • Custom rails route problem with 2.3.8 and Mongrel

    - by CHsurfer
    I have a controller called 'exposures' which I created automatically with the script/generate scaffold call. The scaffold pages work fine. I created a custom action called 'test' in the exposures controller. When I try to call the page (http://127.0.0.1:3000/exposures/test/1) I get a blank, white screen with no text at all in the source. I am using Rails 2.3.8 and mongrel in the development environment. There are no entries in development.log and the console that was used to open mongrel has the following error: You might have expected an instance of Array. The error occurred while evaluating nil.split D:/Rails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/cgi_process.rb:52:in dispatch_cgi' D:/Rails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:101:in dispatch_cgi' D:/Rails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:27:in dispatch' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/rails.rb:76:in process' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/rails.rb:74:in synchronize' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/rails.rb:74:in process' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:159:in process_client' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:158:in each' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:158:in process_client' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:285:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:285:in initialize' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:285:in new' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:285:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:268:in initialize' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:268:in new' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:268:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/configurator.rb:282:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/configurator.rb:281:in each' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/configurator.rb:281:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/mongrel_rails:128:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/command.rb:212:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/mongrel_rails:281 D:/Rails/ruby/bin/mongrel_rails:19:in load' D:/Rails/ruby/bin/mongrel_rails:19 Here is the exposures_controller code: class ExposuresController < ApplicationController # GET /exposures # GET /exposures.xml def index @exposures = Exposure.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @exposures } end end #/exposure/graph/1 def graph @exposure = Exposure.find(params[:id]) project_name = @exposure.tender.project.name group_name = @exposure.tender.user.group.name tender_desc = @exposure.tender.description direction = "Cash Out" direction = "Cash In" if @exposure.supply currency_1_and_2 = "#{@exposure.currency_in} = #{@exposure.currency_out}" title = "#{project_name}:#{group_name}:#{tender_desc}/n" title += "#{direction}:#{currency_1_and_2}" factors = Array.new carrieds = Array.new days = Array.new @exposure.rates.each do |r| factors << r.factor carrieds << r.carried days << r.day.to_s end max = (factors+carrieds).max min = (factors+carrieds).min g = Graph.new g.title(title, '{font-size: 12px;}') g.set_data(factors) g.line_hollow(2, 4, '0x80a033', 'Bounces', 10) g.set_x_labels(days) g.set_x_label_style( 10, '#CC3399', 2 ); g.set_y_min(min*0.9) g.set_y_max(max*1.1) g.set_y_label_steps(5) render :text = g.render end def test render :text = "this works" end # GET /exposures/1 # GET /exposures/1.xml def show @exposure = Exposure.find(params[:id]) @graph = open_flash_chart_object(700,250, "/exposures/graph/#{@exposure.id}") #@graph = "/exposures/graph/#{@exposure.id}" respond_to do |format| format.html # show.html.erb format.xml { render :xml => @exposure } end end # GET /exposures/new # GET /exposures/new.xml def new @exposure = Exposure.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @exposure } end end # GET /exposures/1/edit def edit @exposure = Exposure.find(params[:id]) end # POST /exposures # POST /exposures.xml def create @exposure = Exposure.new(params[:exposure]) respond_to do |format| if @exposure.save flash[:notice] = 'Exposure was successfully created.' format.html { redirect_to(@exposure) } format.xml { render :xml => @exposure, :status => :created, :location => @exposure } else format.html { render :action => "new" } format.xml { render :xml => @exposure.errors, :status => :unprocessable_entity } end end end # PUT /exposures/1 # PUT /exposures/1.xml def update @exposure = Exposure.find(params[:id]) respond_to do |format| if @exposure.update_attributes(params[:exposure]) flash[:notice] = 'Exposure was successfully updated.' format.html { redirect_to(@exposure) } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @exposure.errors, :status => :unprocessable_entity } end end end # DELETE /exposures/1 # DELETE /exposures/1.xml def destroy @exposure = Exposure.find(params[:id]) @exposure.destroy respond_to do |format| format.html { redirect_to(exposures_url) } format.xml { head :ok } end end end Clever readers will notice the 'graph' action. This is what I really want to work, but if I can't even get the test action working, then I'm sure I have no chance. Any ideas? I have restarted mongrel a few times with no change. Here is the output of Rake routes (but I don't believe this is the problem. The error would be in the form of and HTML error response). D:\Rails\rails_apps\fxrake routes (in D:/Rails/rails_apps/fx) DEPRECATION WARNING: Rake tasks in vendor/plugins/open_flash_chart/tasks are deprecated. Use lib/tasks instead. (called from D:/ by/gems/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10) rates GET /rates(.:format) {:controller="rates", :action="index"} POST /rates(.:format) {:controller="rates", :action="create"} new_rate GET /rates/new(.:format) {:controller="rates", :action="new"} edit_rate GET /rates/:id/edit(.:format) {:controller="rates", :action="edit"} rate GET /rates/:id(.:format) {:controller="rates", :action="show"} PUT /rates/:id(.:format) {:controller="rates", :action="update"} DELETE /rates/:id(.:format) {:controller="rates", :action="destroy"} tenders GET /tenders(.:format) {:controller="tenders", :action="index"} POST /tenders(.:format) {:controller="tenders", :action="create"} new_tender GET /tenders/new(.:format) {:controller="tenders", :action="new"} edit_tender GET /tenders/:id/edit(.:format) {:controller="tenders", :action="edit"} tender GET /tenders/:id(.:format) {:controller="tenders", :action="show"} PUT /tenders/:id(.:format) {:controller="tenders", :action="update"} DELETE /tenders/:id(.:format) {:controller="tenders", :action="destroy"} exposures GET /exposures(.:format) {:controller="exposures", :action="index"} POST /exposures(.:format) {:controller="exposures", :action="create"} new_exposure GET /exposures/new(.:format) {:controller="exposures", :action="new"} edit_exposure GET /exposures/:id/edit(.:format) {:controller="exposures", :action="edit"} exposure GET /exposures/:id(.:format) {:controller="exposures", :action="show"} PUT /exposures/:id(.:format) {:controller="exposures", :action="update"} DELETE /exposures/:id(.:format) {:controller="exposures", :action="destroy"} currencies GET /currencies(.:format) {:controller="currencies", :action="index"} POST /currencies(.:format) {:controller="currencies", :action="create"} new_currency GET /currencies/new(.:format) {:controller="currencies", :action="new"} edit_currency GET /currencies/:id/edit(.:format) {:controller="currencies", :action="edit"} currency GET /currencies/:id(.:format) {:controller="currencies", :action="show"} PUT /currencies/:id(.:format) {:controller="currencies", :action="update"} DELETE /currencies/:id(.:format) {:controller="currencies", :action="destroy"} projects GET /projects(.:format) {:controller="projects", :action="index"} POST /projects(.:format) {:controller="projects", :action="create"} new_project GET /projects/new(.:format) {:controller="projects", :action="new"} edit_project GET /projects/:id/edit(.:format) {:controller="projects", :action="edit"} project GET /projects/:id(.:format) {:controller="projects", :action="show"} PUT /projects/:id(.:format) {:controller="projects", :action="update"} DELETE /projects/:id(.:format) {:controller="projects", :action="destroy"} groups GET /groups(.:format) {:controller="groups", :action="index"} POST /groups(.:format) {:controller="groups", :action="create"} new_group GET /groups/new(.:format) {:controller="groups", :action="new"} edit_group GET /groups/:id/edit(.:format) {:controller="groups", :action="edit"} group GET /groups/:id(.:format) {:controller="groups", :action="show"} PUT /groups/:id(.:format) {:controller="groups", :action="update"} DELETE /groups/:id(.:format) {:controller="groups", :action="destroy"} users GET /users(.:format) {:controller="users", :action="index"} POST /users(.:format) {:controller="users", :action="create"} new_user GET /users/new(.:format) {:controller="users", :action="new"} edit_user GET /users/:id/edit(.:format) {:controller="users", :action="edit"} user GET /users/:id(.:format) {:controller="users", :action="show"} PUT /users/:id(.:format) {:controller="users", :action="update"} DELETE /users/:id(.:format) {:controller="users", :action="destroy"} /:controller/:action/:id /:controller/:action/:id(.:format) D:\Rails\rails_apps\fxrails -v Rails 2.3.8 Thanks in advance for the help -Jon

    Read the article

  • Error while starting Rails server

    - by Girish Anand
    Hello i am new to ruby and rails ... but when i am starting the rail server i am getting this error This is the error i am getting D:\mynewapp>ruby script/server = Booting WEBrick = Rails 2.3.5 application starting on http://0.0.0.0:3000 D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': n such file to load -- rush (MissingSourceFile) from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/vendor/gems/delayed_job-1.7.0/lib/delayed/worker.r 1:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/vendor/gems/delayed_job-1.7.0/lib/delayed_job.rb:6 n <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/config/environment.rb:39:in block in <top (requir )>' from D:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:1 :inrun' from D:/mynewapp/config/environment.rb:9:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/commands/server. :84:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from script/server:3:in' Any help will be appreciated Thanks in Advance

    Read the article

  • Having trouble getting cucumber 6.3 to run on rails 2.3.4

    - by Yak
    Hi, I am trying to to get cucumber to run with no luck. Here is the error I am seeing: cucumber features Using the default profile... no such file to load -- test/ (MissingSourceFile) /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require' /Library/Ruby/Gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in require' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in require' /Users/yakovrabinovich/Starstreet/starstreet/vendor/gems/cucumber-0.6.3/bin/../lib/cucumber/rails/world.rb:11 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require' /Library/Ruby/Gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in require' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in require' /Library/Ruby/Gems/1.8/gems/cucumber-rails-0.3.0/lib/cucumber/rails/rspec.rb:1 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require' /Library/Ruby/Gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in require' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in require' /Users/yakovrabinovich/Starstreet/starstreet/features/support/env.rb:11 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require' /Library/Ruby/Gems/1.8/gems/polyglot-0.3.0/lib/polyglot.rb:65:in require' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/rb_support/rb_language.rb:124:in load_code_file' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:85:in load_code_file' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:77:in load_code_files' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:76:in each' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:76:in load_code_files' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/cli/main.rb:48:in execute!' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/../lib/cucumber/cli/main.rb:20:in execute' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.3/bin/cucumber:8 /usr/bin/cucumber:19:in `load' /usr/bin/cucumber:19 Here are my gems: Yakov-Rabinovichs-MacBook:1.8 yakovrabinovich$ gem list * LOCAL GEMS * aasm (2.1.3) acl9 (0.11.0) actionmailer (2.3.4, 2.2.2, 1.3.6) actionpack (2.3.4, 2.2.2, 1.13.6) actionwebservice (1.2.6) activerecord (2.3.4, 2.2.2, 1.15.6) activeresource (2.3.4, 2.2.2) activesupport (2.3.4, 2.2.2, 1.4.4) acts_as_ferret (0.4.3) authlogic (2.1.3) bgetting-hominid (1.2.0) builder (2.1.2) capistrano (2.5.2) capistrano-ext (1.2.1) cgi_multipart_eof_fix (2.5.0) chronic (0.2.3) columnize (0.3.1) configatron (2.5.1) cucumber (0.6.3) cucumber-rails (0.3.0) daemons (1.0.10) database_cleaner (0.5.0) diff-lcs (1.1.2) dnssd (0.6.0) factory_girl (1.2.3) fastthread (1.0.1) fcgi (0.8.7) ferret (0.11.6) gem_plugin (0.2.3) gemcutter (0.4.1) highline (1.5.0) hoe (2.5.0) hominid (2.1.0) hpricot (0.6.164) json (1.2.0) json_pure (1.2.0) libxml-ruby (1.1.2) linecache (0.43) mocha (0.9.8) mongrel (1.1.5) needle (1.3.0) net-scp (1.0.1) net-sftp (2.0.1, 1.1.1) net-ssh (2.0.16, 2.0.4, 1.1.4) net-ssh-gateway (1.0.0) nokogiri (1.4.1) oauth (0.3.6) pg (0.8.0) polyglot (0.3.0) rack (1.0.1) rack-test (0.5.3) rails (2.3.4, 2.2.2, 1.2.6) rake (0.8.7, 0.8.3) RedCloth (4.1.1) rspec (1.3.0) rspec-rails (1.3.2) ruby-debug (0.10.3) ruby-debug-base (0.10.3) ruby-hmac (0.4.0) ruby-openid (2.1.2) ruby-yadis (0.3.4) rubyforge (2.0.3) rubygems-update (1.3.5) rubynode (0.1.5) sqlite3-ruby (1.2.4) term-ansicolor (1.0.4) termios (0.9.4) test-unit (1.2.3) thoughtbot-factory_girl (1.2.2) thoughtbot-shoulda (2.10.2) treetop (1.4.4) whenever (0.4.1) will_paginate (2.3.11) xmpp4r (0.4) yamler (0.1.0) Any help would be greatly appreciated!

    Read the article

  • shopify_app syntax error

    - by Pete171
    Edit: Debugging has got me further. Question clarified. We have installed Ruby, RubyGems and Rails and have forked the shopify_app project. We have created a new rails applications and added three items to the Gemfile: execjs, therubyracer and shopify_app. Running rails s in order to start our rails application returns this trace: root@ubuntu:/usr/local/pete-shopify/cart# rails s Faraday: you may want to install system_timer for reliable timeouts /var/lib/gems/1.8/gems/shopify_app-4.1.0/lib/shopify_app.rb:15:in `require': /var/lib /gems/1.8/gems/shopify_app-4.1.0/lib/shopify_app/login_protection.rb:5: syntax error, unexpected ':', expecting kEND (SyntaxError) ...rce::UnauthorizedAccess, with: :close_session ^ from /var/lib/gems/1.8/gems/shopify_app-4.1.0/lib/shopify_app.rb:15 from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `require' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler.rb:128:in `require' from /usr/local/pete-shopify/cart/config/application.rb:7 from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require' from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:53 from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap' from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:50 from script/rails:6:in `require' from script/rails:6 I haven't modified any files since forking from Github. Lines 1 - 6 of login_protection.rb are as follows: module ShopifyApp::LoginProtection extend ActiveSupport::Concern included do rescue from ActiveResource::UnauthorizedAccess, with: :close_session end I've looked into this and it seems that the error is caused by a new-style hash syntax between Ruby 1.8 and 1.9; key : value instead of key => value. Running ruby -v from the command line returns ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]. This would seem to be OK... but I did some debugging, and inside the file /var/lib/gems/1.8/gems/shopify_app-4.1.0/lib/shopify_app.rb (at the top) by putting this: puts RUBY_VERSION exit It printed 1.8.7. **Why are ruby -v and RUBY_VERSION giving me different results? And am I correct in assuming this is the cause of my problems? Note: To upgrade Ruby I installed the later version with apt-get and then switched to it by using update-alternatives --config ruby and selecting option 2 like this: root@ubuntu:/usr/local/pete-shopify/cart# update-alternatives --config ruby There are 2 choices for the alternative ruby (providing /usr/bin/ruby). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/ruby1.8 50 auto mode 1 /usr/bin/ruby1.8 50 manual mode * 2 /usr/bin/ruby1.9.1 10 manual mode Also note: We're PHP/Python developers so this is all new to us! Summary: 1 - Am I right in determining the cause of the syntax error? 2 - Why does RUBY_VERSION and ruby -v give me different results?

    Read the article

  • Paperclip: delete attachment and "can't convert nil into String" error

    - by snitko
    I'm using Paperclip and here's what I do in the model to delete attachments: def before_save self.avatar = nil if @delete_avatar == 1.to_s end Works fine unless @delete_avatar flag is set when the user is actually uploading the image (so the model receives both params[:user][:avatar] and params[:user][:delete_avatar]. This results in the following error: TypeError: can't convert nil into String from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:40:in `dirname' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:40:in `flush_writes' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:38:in `each' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:38:in `flush_writes' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/attachment.rb:144:in `save' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/attachment.rb:162:in `destroy' from /Work/project/src/app/models/user.rb:72:in `before_save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:347:in `send' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:347:in `callback' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:249:in `create_or_update' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2538:in `save_without_validation' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/validations.rb:1078:in `save_without_dirty' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/dirty.rb:79:in `save_without_transactions' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `send' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `with_transaction_returning_status' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:182:in `transaction' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:228:in `with_transaction_returning_status' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:208:in `rollback_active_record_state!' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:723:in `create' I assume it has something to do with the avatar.dirty? value because when it certainly is true when this happens. The question is, how do I totally reset the thing if there are changes to be saved and abort avatar upload when the flag is set?

    Read the article

  • Custom validation works in development but not in unit test

    - by Geolev
    I want to validate that at least one of two columns have a value in my model. I found somewhere on the web that I could create a custom validator as follows: # Check for the presence of one or another field: # :validates_presence_of_at_least_one_field :last_name, :company_name - would require either last_name or company_name to be filled in # also works with arrays # :validates_presence_of_at_least_one_field :email, [:name, :address, :city, :state] - would require email or a mailing type address module ActiveRecord module Validations module ClassMethods def validates_presence_of_at_least_one_field(*attr_names) msg = attr_names.collect {|a| a.is_a?(Array) ? " ( #{a.join(", ")} ) " : a.to_s}.join(", ") + "can't all be blank. At least one field must be filled in." configuration = { :on => :save, :message => msg } configuration.update(attr_names.extract_options!) send(validation_method(configuration[:on]), configuration) do |record| found = false attr_names.each do |a| a = [a] unless a.is_a?(Array) found = true a.each do |attr| value = record.respond_to?(attr.to_s) ? record.send(attr.to_s) : record[attr.to_s] found = !value.blank? end break if found end record.errors.add_to_base(configuration[:message]) unless found end end end end end I put this in a file called lib/acs_validator.rb in my project and added "require 'acs_validator'" to my environment.rb. This does exactly what I want. It works perfectly when I manually test it in the development environment but when I write a unit test it breaks my test environment. This is my unit test: require 'test_helper' class CustomerTest < ActiveSupport::TestCase # Replace this with your real tests. test "the truth" do assert true end test "customer not valid" do puts "customer not valid" customer = Customer.new assert !customer.valid? assert customer.errors.invalid?(:subdomain) assert_equal "Company Name and Last Name can't both be blank.", customer.errors.on(:contact_lname) end end This is my model: class Customer < ActiveRecord::Base validates_presence_of :subdomain validates_presence_of_at_least_one_field :customer_company_name, :contact_lname, :message => "Company Name and Last Name can't both be blank." has_one :service_plan end When I run the unit test, I get the following error: DEPRECATION WARNING: Rake tasks in vendor/plugins/admin_data/tasks, vendor/plugins/admin_data/tasks, and vendor/plugins/admin_data/tasks are deprecated. Use lib/tasks instead. (called from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10) Couldn't drop acs_test : #<ActiveRecord::StatementInvalid: PGError: ERROR: database "acs_test" is being accessed by other users DETAIL: There are 1 other session(s) using the database. : DROP DATABASE IF EXISTS "acs_test"> acs_test already exists NOTICE: CREATE TABLE will create implicit sequence "customers_id_seq" for serial column "customers.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "customers_pkey" for table "customers" NOTICE: CREATE TABLE will create implicit sequence "service_plans_id_seq" for serial column "service_plans.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "service_plans_pkey" for table "service_plans" /usr/bin/ruby1.8 -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/customer_test.rb" "test/unit/service_plan_test.rb" "test/unit/helpers/dashboard_helper_test.rb" "test/unit/helpers/customers_helper_test.rb" "test/unit/helpers/service_plans_helper_test.rb" /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1994:in `method_missing_without_paginate': undefined method `validates_presence_of_at_least_one_field' for #<Class:0xb7076bd0> (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/will_paginate-2.3.12/lib/will_paginate/finder.rb:170:in `method_missing' from /home/george/projects/advancedcomfortcs/app/models/customer.rb:3 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:265:in `require_or_load' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:224:in `depend_on' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:136:in `require_dependency' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:414:in `load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:413:in `each' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:413:in `load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:411:in `each' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:411:in `load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:197:in `process' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run' from /home/george/projects/advancedcomfortcs/config/environment.rb:9 from ./test/test_helper.rb:2:in `require' from ./test/test_helper.rb:2 from ./test/unit/customer_test.rb:1:in `require' from ./test/unit/customer_test.rb:1 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 rake aborted! Command failed with status (1): [/usr/bin/ruby1.8 -I"lib:test" "/usr/lib/ru...] (See full trace by running task with --trace) It seems to have stepped on will_paginate somehow. Does anyone have any suggestions? Is there another way to do the validation I'm attempting to do? Thanks, George

    Read the article

  • Paperclip: delete attachments and "can't convert nil into String" error

    - by snitko
    I'm using Paperclip and here's what I do in the model to delete attachments: def before_save self.avatar = nil if @delete_avatar == 1.to_s end Works fine unless @delete_avatar flag is set when the user is actually uploading the image (so the model receives both params[:user][:avatar] and params[:user][:delete_avatar]. This results in the following error: TypeError: can't convert nil into String from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:40:in `dirname' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:40:in `flush_writes' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:38:in `each' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/storage.rb:38:in `flush_writes' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/attachment.rb:144:in `save' from /Work/project/src/vendor/plugins/paperclip/lib/paperclip/attachment.rb:162:in `destroy' from /Work/project/src/app/models/user.rb:72:in `before_save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:347:in `send' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:347:in `callback' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:249:in `create_or_update' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2538:in `save_without_validation' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/validations.rb:1078:in `save_without_dirty' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/dirty.rb:79:in `save_without_transactions' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `send' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `with_transaction_returning_status' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:182:in `transaction' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:228:in `with_transaction_returning_status' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:208:in `rollback_active_record_state!' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:723:in `create' I assume it has something to do with the avatar.dirty? value because when it certainly is true when this happens. The question is, how do I totally reset the thing if there are changes to be saved and abort avatar upload when the flag is set?

    Read the article

  • Problem with videos on heroku

    - by mnml
    Hi, I have recently moved my RoR app on the Heroku platform, and almost everything works fine apart from the videos. It works fine when my app runs in local but not on heroku. This is the error log I'm getting, if anyone knows where it can be coming from: Processing VideosController#new (for IP at 2010-03-20 04:32:09) [GET] Session ID: 6abecf60c3369d7c7029e366bb801e08 Parameters: {"artist_id"=>"10", "action"=>"new", "controller"=>"admin/videos"} Rendering within layouts/admin Rendering admin/videos/new ActionView::TemplateError (undefined method `video_file_relative_path' for #<Video:0x2adc9839fe28>) on line #21 of app/views/admin/videos/ _form.rhtml: 18: 19: <p><label for="videos_image_file">Fichier Vidéo SWF</label><br/> 20: <% if @video.video_file %> 21: <%= link_to image_tag(url_for_file_column("video", "video_file", :name => "thumbnail"))+"<br>", {:controller => url_for_file_column("video", "video_file")}, :popup => ['new_window', 'height=200,width=200'] %> 22: <% end %> 23: <%= file_column_field 'video', 'video_file' %> 24: &nbsp;&nbsp;&nbsp; #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb: 1792:in `method_missing' #{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column_helper.rb: 75:in `send' #{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column_helper.rb: 75:in `url_for_file_column' #{RAILS_ROOT}/app/views/admin/videos/_form.rhtml:21:in `_run_rhtml_admin_videos__form' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `compile_and_render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 290:in `render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 249:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 264:in `render' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/partials.rb: 59:in `render_partial' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:33:in `benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/partials.rb: 58:in `render_partial' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 276:in `render' #{RAILS_ROOT}/app/views/admin/videos/new.rhtml:4:in `_run_rhtml_admin_videos_new' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `compile_and_render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 290:in `render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 249:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:699:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:621:in `render_with_no_layout' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ layout.rb:243:in `render_without_benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:53:in `render' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:53:in `render' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:911:in `perform_action_without_filters' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ filters.rb:368:in `perform_action_without_benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ rescue.rb:82:in `perform_action' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:381:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:381:in `process_without_filters' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ filters.rb:377:in `process_without_session_management_support' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ session_management.rb:117:in `process' #{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/ rails.rb:60:in `serve_rails' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/ rails.rb:80:in `call' /home/heroku_rack/lib/static_assets.rb:9:in `call' /home/heroku_rack/lib/last_access.rb:25:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 46:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 40:in `each' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 40:in `call' /home/heroku_rack/lib/date_header.rb:14:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb: 60:in `call' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:80:in `pre_process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:78:in `catch' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:78:in `pre_process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:57:in `process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:42:in `receive_data' /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `run_machine' /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `run' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/ base.rb:57:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/server.rb: 150:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/controllers/ controller.rb:80:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 173:in `send' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 173:in `run_command' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 139:in `run!' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/bin/thin:6 /usr/local/bin/thin:20:in `load' /usr/local/bin/thin:20 Thanks

    Read the article

  • no such file to load -- rails (MissingSourceFile)... say what?!!

    - by Julian
    Hello, I'm having an obnoxious and weird problem while trying to include the ThinkingTank gem into my rails project. When I include gem 'thinkingtank' in my project's Gemfile I get the following error: ~/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require': no such file to load -- rails (MissingSourceFile) from ~/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/thinkingtank-0.0.5/lib/thinkingtank.rb:1 from ~/.rvm/gems/ree-1.8.7-2010.01/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/bundler-1.0.7/lib/bundler.rb:112:in `require' from ~/git/myproject/config/boot.rb:121:in `load_environment' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/rails-2.3.5/lib/initializer.rb:137:in `process' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/rails-2.3.5/lib/initializer.rb:113:in `send' from ~/.rvm/gems/ree-1.8.7-2010.01/gems/rails-2.3.5/lib/initializer.rb:113:in `run' from ~/git/myproject/config/environment.rb:9 from ~/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/1.8/irb/init.rb:254:in `require' from ~/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/1.8/irb/init.rb:254:in `load_modules' from ~/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/1.8/irb/init.rb:252:in `each' from ~/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/1.8/irb/init.rb:252:in `load_modules' from ~/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/1.8/irb/init.rb:21:in `setup' from ~/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/1.8/irb.rb:54:in `start' from ~/.rvm/rubies/ree-1.8.7-2010.01/bin/irb:17 The output from ruby -v is: ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.6.0], MBARI 0x6770, Ruby Enterprise Edition 2010.01 And the output from rails -v is: Rails 2.3.5 I've followed the basic guidelines from their documentation and from similar SA questions. But none of issues have the rails gem going missing.. And yes, we are including rails in our Gemfile =) Thank you in advance.

    Read the article

  • Incompatible library creating new project with Aptana

    - by Phil Rice
    I am a ruby and rails newbie, so my abilities to debug this are somewhat limited. I have just added the eclipse plugin which failed, then downloaded the latest aptana studio which also failed. The failure was the same in both cases. The nature of the failure is that when I create a new rails project, I get an error message about an incompatible library version "C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mswin32-60/lib/http11.so". The project is actually created, along with directories and files. Google searches around this error message have only returned a couple of hits, which were not very helpful I am wondering if this is about 64 bit libraries. My software stack is: Windows 7 home premium 64bit Aptana RadRails, build: 2.0.5.1278709071 Ruby1.9.3 gem 1.8.24 The console shows: "4320" C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': incompatible library version - C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mswin32-60/lib/http11.so (LoadError) from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:12:in `<top (required)>' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:1:in `<top (required)>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `const_get' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `block in get' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `each' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.4/lib/commands/server.rb:45:in `<top (required)>' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from script/server:3:in `<top (required)>' from -e:2:in `load' from -e:2:in `<main>'

    Read the article

  • nanoc installation setup in Linux

    - by Ananth
    I'm a newbie to Ruby. Trying to setup nanoc in my machine. I'm running Ubuntu 14.04. After the nanoc installation, when I type $nanoc --version I get the following errors: /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler/shared_helpers.rb:24:in `default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound) from /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler.rb:248:in `default_gemfile' from /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler.rb:192:in `root' from /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler.rb:99:in `bundle_path' from /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler.rb:400:in `configure_gem_home_and_path' from /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler.rb:90:in `configure' from /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler.rb:151:in `definition' from /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler.rb:116:in `setup' from /home/ananth/.rvm/gems/ruby-head@global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require' from /home/ananth/.rvm/gems/ruby-head/gems/nanoc-3.7.0/bin/nanoc:7:in `<top (required)>' from /home/ananth/.rvm/gems/ruby-head/bin/nanoc:23:in `load' from /home/ananth/.rvm/gems/ruby-head/bin/nanoc:23:in `<main>' from /home/ananth/.rvm/gems/ruby-head/bin/ruby_executable_hooks:15:in `eval' from /home/ananth/.rvm/gems/ruby-head/bin/ruby_executable_hooks:15:in `<main>' Am I missing something from my rvm? Anything to do with $PATH, .bashrc or .bash_profile? Thanks for the help in advance!

    Read the article

  • Upgrading to Ubuntu 11.04 failed

    - by Rupert
    Today Ubuntu asked me to upgrade to 11.04. The installation went completely fine until right at the end when the following packages failed: install-info ubuntu-standard The installer hung so I had to shut it down manually. Ubuntu still works fine but it says that the upgrade didn't work properly so I am hesitant to restart it until I have resolved the problem in case I can't get back in. I am running Ubuntu inside the latest version of Virtual Box and was previously running version 10.10. I have tried installing install-info manually with apt-get but I get the following error: Unhandled exception: [#<SystemStackError: stack level too deep>] /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:842:in `block in <class:Autotest>': undefined method `backtrace' for [#<SystemStackError: stack level too deep>]:Array (NoMethodError) from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:828:in `[]' from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:828:in `block in hook' from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:828:in `each' from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:828:in `any?' from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:828:in `hook' from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:344:in `rescue in run' from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:320:in `run' from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/lib/autotest.rb:241:in `run' from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ZenTest-4.5.0/bin/autotest:6:in `<top (required)>' from /usr/local/ruby/bin/autotest:19:in `load' from /usr/local/ruby/bin/autotest:19:in `<main>' dpkg: error processing install-info (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of info: info depends on install-info; however: Package install-info is not configured yet. dpkg: error processing info (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-standard: ubuntu-standard depends on info; however: Package info is not configured yet. dpkg: error processing ubuntu-standard (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates it's a follow-up error from a previous failure. No apport report written because the error message indicates it's a follow-up error from a previous failure. Errors were encountered while processing: install-info info ubuntu-standard E: Sub-process /usr/bin/dpkg returned an error code (1) Any ideas on what I should try next?

    Read the article

  • Debugging cucumber/gem dependencies

    - by mobmad
    How do you debug and fix gem errors like below? Although the below case is very specific, I'm also looking for solution to related problems like "gem already activated [...]", and resources to gem management/debugging. mycomputer:projectfolder username$ cucumber features Using the default profile... WARNING: No DRb server is running. Running features locally: /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement can't activate , already activated ruby-hmac-0.4.0 (Gem::Exception) /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:101:in `specification' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/locator.rb:81:in `plugins' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `inject' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/locator.rb:81:in `each' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/locator.rb:81:in `inject' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/locator.rb:81:in `plugins' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:109:in `locate_plugins' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:108:in `map' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:108:in `locate_plugins' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:32:in `all_plugins' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:22:in `plugins' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:53:in `add_plugin_load_paths' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/initializer.rb:294:in `add_plugin_load_paths' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/initializer.rb:136:in `process' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send' /Users/username/.gem/ruby/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' /Users/username/Documents/projectfolder.0/sites/projectfolder/config/environment.rb:9 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require' /Library/Ruby/Gems/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require' ./features/support/env.rb:12 /Library/Ruby/Gems/1.8/gems/spork-0.7.5/lib/spork.rb:23:in `prefork' ./features/support/env.rb:9 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require' /Library/Ruby/Gems/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require' /Library/Ruby/Gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/rb_support/rb_language.rb:124:in `load_code_file' /Library/Ruby/Gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/step_mother.rb:84:in `load_code_file' /Library/Ruby/Gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/step_mother.rb:76:in `load_code_files' /Library/Ruby/Gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/step_mother.rb:75:in `each' /Library/Ruby/Gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/step_mother.rb:75:in `load_code_files' /Library/Ruby/Gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/cli/main.rb:47:in `execute!' /Library/Ruby/Gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/cli/main.rb:24:in `execute' /Library/Ruby/Gems/1.8/gems/cucumber-0.4.4/bin/cucumber:8 /usr/bin/cucumber:19:in `load' /usr/bin/cucumber:19 And this is the output from gem list actionmailer (2.3.5, 2.2.2, 1.3.6) actionpack (2.3.5, 2.2.2, 1.13.6) actionwebservice (1.2.6) activerecord (2.3.5, 2.2.2, 1.15.6) activeresource (2.3.5, 2.2.2) activesupport (2.3.5, 2.2.2, 1.4.4) acts_as_ferret (0.4.4, 0.4.3) adamwiggins-rest-client (1.0.4) aslakhellesoy-webrat (0.4.4.1) aslakjo-comatose (2.0.5.12) authlogic (2.1.3) authlogic-oid (1.0.4) builder (2.1.2) capistrano (2.5.17, 2.5.2) cgi_multipart_eof_fix (2.5.0) configuration (1.1.0) cucumber (0.4.4) cucumber-rails (0.3.0) daemons (1.0.10) database_cleaner (0.5.0) diff-lcs (1.1.2) dnssd (1.3.1, 0.6.0) fakeweb (1.2.8) fastthread (1.0.7, 1.0.1) fcgi (0.8.8, 0.8.7) ferret (0.11.6) gem_plugin (0.2.3) gemcutter (0.4.1) heroku (1.8.0) highline (1.5.2, 1.5.0) hoe (2.5.0) hpricot (0.8.2, 0.6.164) json (1.2.2) json_pure (1.2.2) launchy (0.3.5) libxml-ruby (1.1.3, 1.1.2) linecache (0.43) log4r (1.1.5) mime-types (1.16) mongrel (1.1.5) mysql (2.8.1) needle (1.3.0) net-scp (1.0.2, 1.0.1) net-sftp (2.0.4, 2.0.1, 1.1.1) net-ssh (2.0.20, 2.0.4, 1.1.4) net-ssh-gateway (1.0.1, 1.0.0) nifty-generators (0.3.2) nokogiri (1.4.1) oauth (0.3.6) oniguruma (1.1.0) plist (3.1.0) polyglot (0.2.9) rack (1.1.0, 1.0.1) rack-test (0.5.3) rails (2.3.5, 2.2.2, 1.2.6) rake (0.8.7, 0.8.3) RedCloth (4.2.2, 4.1.1) rest-client (1.4.0) rspec (1.3.0) rspec-rails (1.3.2) ruby-activeldap (0.8.3.1) ruby-debug-base (0.10.3) ruby-debug-ide (0.4.9) ruby-hmac (0.4.0) ruby-net-ldap (0.0.4) ruby-openid (2.1.7, 2.1.2) ruby-yadis (0.3.4) rubyforge (2.0.4) rubygems-update (1.3.6) rubynode (0.1.5) rubyzip (0.9.4) sanitize (1.2.0) sequel (3.0.0) sinatra (0.9.2) spork (0.7.5) sqlite3-ruby (1.2.5, 1.2.4) taps (0.2.26) term-ansicolor (1.0.4) termios (0.9.4) textpow (0.10.1) thor (0.9.9) treetop (1.4.2) twitter4r (0.3.2, 0.3.1) ultraviolet (0.10.2) webrat (0.7.0) will_paginate (2.3.12) xmpp4r (0.5, 0.4)

    Read the article

  • Monit and Thin and Unfound Gems

    - by TenJack
    I've been using Monit to monitor my Thin server and everything was working until I upgraded my Rails version from 2.3.4 to 2.3.14. Now when I try and start Thin using monit it gives me an unfound gem error: Missing the Rails 2.3.14 gem. Please `gem install -v=2.3.14 rails` I thought this may be a GEM PATH issue and also tried setting the GEM_HOME and PATH variables in the start command: check process thin3001 with pidfile /home/blahblah/apps/Vocab/shared/pids/thin.3001.pid start program = "/usr/bin/env PATH=/usr/lib/ruby/gems/1.8/gems GEM_HOME=/usr/lib/ruby/gems/1.8/gems /usr/bin/ruby /usr/bin/thin -C /etc/thin/vocab.yml start -o 3001" stop program = "/usr/bin/ruby /usr/bin/thin -C /etc/thin/vocab.yml stop -o 3001" if totalmem > 150.0 MB for 5 cycles then restart group thin It's strange because if I run the start command in the console it works fine, it's only within monit that I get the missing Gems error.

    Read the article

  • How do I fix this error? config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specificatio

    - by Ganesh Shankar
    I get this error when launching my Mongrel server... $ script/server --debugger => Booting Mongrel => Rails 2.3.5 application starting on http://0.0.0.0:3000 config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. => Debugger enabled => Call with -d to detach => Ctrl-C to shutdown server When I run rake gems:refresh_specs like it suggests I get another error though: rake aborted! undefined method `installed_source_index' for #<Gem::SourceIndex:0x100551a58> Any thoughts on how to fix this?

    Read the article

  • gems, bundle command, and ruby not found in new terminal window

    - by user3579987
    So I installed ruby with rvm, ran a bundle install and installed a bunch of gems, etc. It all works just fine in the original terminal window I did all of this in but I opened up a new terminal window and now I'm getting errors like bundle: command not found and gem command not found. I tried doing a symbolic link for the gem command but then when I do gem list it displays a much shorter list of my local gems and not at all the ones I need for bundle install. Is there something I need to do to configure bash or rvm so that it recognizes that I did indeed install all the gems I have installed? name@crunchbang:~/ug_research_portal$ which gem /home/name/.rvm/rubies/ruby-2.1.1/bin/gem name@crunchbang:~/ug_research_portal$ which ruby /home/name/.rvm/rubies/ruby-2.1.1/bin/ruby And in ~/.bashrc: GEM_HOME="/home/name/.rvm/gems/ruby-2.1.1" GEMGLOBAL_HOME="/home/ name/.rvm/gems/ruby-2.1.1@global" export PATH=$PATH:$GEM_HOME/bin:$GEMGLOBAL_HOME/bin:$HOME/.rvm/bin Edit: Looks like my $PATH is somehow wrong? bash: /home/name/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/name/.rvm/gems/ruby-2.1.1/bin:/home/name/.rvm/gems/ruby-2.1.1@global/bin:/home/name/.rvm/bin/: No such file or directory which is odd since ls for /home/name/.rvm/bin and /home/name/.rvm/gems/ruby-2.1.1@global/bin and /home/name/.rvm/gems/ruby-2.1.1/bin work just fine Psych, I was just doing $PATH instead of echo "$PATH" which was giving me the No such file or directory error. The original problem still stands though.

    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

  • "Malformed version number string mingw32" when starting rails

    - by Freewind
    My os: windows xp, ruby: 1.8.7, rails: 2.3.5 Everything was fine, but I just installed a "gcc-4.4.0-mingw32-bin", and run gem install rdiscount, then my rails can't start. Now when I run ruby script/server, or rake gems:install, the following error will occur: rake aborted! Malformed version number string mingw32 (See full trace by running task with --trace) E:\WORKSPACE_TOPCODER\wenda_ror>ruby script/server => Booting Mongrel => Rails 2.3.5 application starting on http://0.0.0.0:3000 E:/Ruby/ruby-187/lib/ruby/site_ruby/1.8/rubygems/version.rb:182:in `initialize': Malformed version number string mingw32 (ArgumentError) from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:105:in `new' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:105:in `version_for_dir' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:47:in `refresh!' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:45:in `each' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:45:in `refresh!' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:29:in `initialize' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:21:in `new' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:298:in `add_gem_load_paths' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:132:in `process' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' from E:/WORKSPACE_TOPCODER/wenda_ror/config/environment.rb:9 from E:/Ruby/ruby-187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from E:/Ruby/ruby-187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from E:/Ruby/ruby-187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' Now I have re-installed my ruby and rails, but the same error still occurs. And I have searched in google, found no solution. It seems I have to re-install my windows xp. Somebody knows the reason? Help...

    Read the article

  • Build & Install Ruby Gems with Rake

    - by kerry
    Are you using rake to build your gems?  Have you ever wished there were an install task to install it to your machine?  I, for one, have written something like this a few times: 1: desc 'Install the gem' 2: task :install do 3: exec 'gem install pkg/goodies-0.1.gem' 4: end 5:  That is pretty straightforward.  However, this will not work under JRuby on Mac where the command should be ‘jgem’.  So we can enhance it to detect the platform, and host OS: 1: desc 'Install the gem' 2: task :install do 3: executable = RUBY_PLATFORM[/java/] && Config::CONFIG[/darwin/] ? 'jgem' : 'gem' 4: exec "#{executable} install pkg/goodies-0.1.gem" 5: end This is a little better.  I am still not comfortable with the sloppiness of building a shell command and executing it though.  It is possible to do it with strictly Ruby.  I am also going namespace it to integrate better with the GemPackageTask.  Now it will be accessed via ‘rake gem:install’ 1: desc 'Install the gem' 2: namespace 'gem' do 3: task :install do 4: Gem::Installer.new('pkg/goodies-0.1.gem').install 5: end 6: end   I have included this in the goodies gem 0.2, so go ahead and install it!  ‘gem install goodies’

    Read the article

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