I'm trying to deploy a PHP project using Capistrano. When I try to do a cap deploy, I get an error:
wes:/var/www/nipponpulse [svn:] → cap deploy
* executing `deploy'
** transaction: start
* executing `deploy:update_code'
executing locally: "svn info https://newcitymedia.svn.beanstalkapp.com/nippon_pulse/expressionengine -rHEAD"
/opt/local/bin/svn
* executing "svn checkout -q -r94 https://newcitymedia.svn.beanstalkapp.com/nippon_pulse/expressionengine /var/www/nipponpulse/releases/20091117150904 && (echo 94 > /var/www/nipponpulse/releases/20091117150904/REVISION)"
servers: ["192.168.2.42"]
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/nipponpulse/releases/20091117150904; true"
servers: ["192.168.2.42"]
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: 192.168.2.42 (NoMethodError: private method `split' called for 42:Fixnum)
connection failed for: 192.168.2.42 (NoMethodError: private method `split' called for 42:Fixnum)
Here's the recipe I'm using http://pastie.textmate.org/private/7mix7xhbf3ozwjskwt5orq. I'm using Snow Leopard and here's my list of gems (using sudo gem list --local):
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.4, 0.4.3)
adamcooke-key-installer (1.1)
capistrano (2.5.9, 2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
defunkt-github (0.3.4)
dnssd (1.3.1, 1.3, 0.6.0)
fastthread (1.0.7, 1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.1, 1.5.0)
hpricot (0.8.1, 0.6.164)
json_pure (1.1.9)
libxml-ruby (1.1.3, 1.1.2)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.2, 1.0.1)
net-sftp (2.0.2, 2.0.1, 1.1.1)
net-ssh (2.0.15, 2.0.4, 1.1.4)
net-ssh-gateway (1.0.1, 1.0.0)
open4 (0.9.6)
rack (1.0.1, 1.0.0)
rails (2.3.4, 2.2.2, 1.2.6)
rake (0.8.7, 0.8.3)
RedCloth (4.2.2, 4.1.1)
ruby-openid (2.1.7, 2.1.2)
ruby-yadis (0.3.4)
rubygems-update (1.3.5)
rubynode (0.1.5)
sqlite3-ruby (1.2.5, 1.2.4)
termios (0.9.4)
vlad (2.0.0)
xmpp4r (0.5, 0.4)
When I run ruby -v I see this:
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
I'm not sure why it's failing. My experience with rails and ruby in general is slim to none, but I've used Capistrano in the past and it has worked on this machine. Is there something specific with Snow Leopard that I need to fix?
Edit: updated the error
Note that the error reads "exception while rolling back", which means that the error you're seeing occurred when Capistrano was already trying to rollback due to some other error. In other words, it's a red herring. If you can include the complete output of capistrano from the command in question, someone might be able to help you identify what really went wrong.
You should examine this error:
connection failed for: 192.168.2.42 (NoMethodError: private method `split' called for 42:Fixnum)
What host is this? Local? And try to check where the NoMethodError for split comes from.
You can also fire this cap command just to see if the destination server is the one not reachable:
cap invoke COMMAND='ls -l'
Related
I have a query about RadRails and the activerecord-oracle_enhanced-adapter. I am using RadRails 2.
Below is a list of my local gems, garnered from the output of the gem list –local command:
*** LOCAL GEMS ***
actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activerecord-oracle_enhanced-adapter (1.6.7)
activeresource (2.3.4)
activesupport (2.3.4)
bigdecimal (1.2.6)
io-console (0.4.3)
json (1.8.1)
oracle_enhanced (1.2.5)
psych (2.0.8)
rack (1.0.1)
rails (2.3.4)
rake (10.4.2)
rdoc (4.2.0)
However, when I try to run the rake migrate command the following appears:
rake aborted!
Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (no such file to load -- active_record/connection_adapters/oracle_enhanced_adapter)
(See full trace by running task with --trace)
I have uninstalled activerecord-oracle_enhanced-adapter and reinstalled it, restarted RadRails, all to no avail.
The problem is that you using rails 2.3.4 (last updated in 2010) with the newest activerecord oracle enhanced adapter 1.6.7 that released just few weeks ago.
Try to update your rails to 4.1 (it's also requires update ruby to 2.3) or downgrade activerecord-oracle_enhanced-adapter to 1.3.2 in your Gemfile:
gem 'activerecord-oracle_enhanced-adapter', '~> 1.3', '>= 1.3.2'
Also it would be better do not use so old RadRails. Try latest ruby and rails in any modern editor or IDE!
i have a problem - i have Ubuntu 12.04 server and I am trying to host ruby on rails app on it.
I have chosen passenger with apache. I have installed RVM and made gemset "ruby-1.9.2-p320#myapp" and it works. I have really old rails 2.3.8 app, which is just for archive for me and I dont have any time to update it.
I have passenger error Please install the mysql2 adapter: 'gem install activerecord-mysql2-adapter' (no such file to load -- active_record/connection_adapters/mysql2_adapter)
My "gem list":
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activerecord-mysql2-adapter (0.0.3)
activeresource (2.3.8)
activesupport (2.3.8)
bundler (1.2.3)
daemon_controller (1.1.1)
fastthread (1.0.7)
mislav-will_paginate (2.3.11)
mysql2 (0.2.7)
passenger (3.0.19)
rack (1.1.6)
rails (2.3.8)
rake (10.0.3)
rubygems-bundler (1.1.0)
rubygems-update (1.8.25, 1.3.5)
rvm (1.11.3.6)
sqlite3 (1.3.7)
sqlite3-ruby (1.3.3)
thoughtbot-paperclip (2.3.1)
will_paginate (3.0.4)
I can using ruby script/console get to database records, so connection with database is established and it WORKS.
Is there any ideas for solution?
Thank you.
If any extra info is needed, it will be provided asap.
This was misconfiguration of Passenger and Apache from my part.
Just follow these loveley tutorial and all will be OK: http://everydayrails.com/2010/09/13/rvm-project-gemsets.html
And if you afterwards run into problems of UTF-8 errors for older rails apps, just read on that here: http://railsforum.com/viewtopic.php?id=42009
I can´t install the rcov gem ;-(
I use BitNami Redmine, Windows 7.
gem install rcov
Result:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rcov:
ERROR: Failed to build gem native extension.
"C:/Program Files/BitNami Redmine Stack/ruby/bin/ruby.exe" extconf.rb
creating Makefile
make
Makefile:130: warning: overriding commands for target `C:/Program'
Makefile:124: warning: ignoring old commands for target `C:/Program'
Makefile:130: warning: overriding commands for target `Files/BitNami'
Makefile:124: warning: ignoring old commands for target `Files/BitNami'
Makefile:130: warning: overriding commands for target `Redmine'
Makefile:124: warning: ignoring old commands for target `Redmine'
make: *** No rule to make target `ruby.h', needed by `callsite.o'. Stop.
Gem files will remain installed in C:/Program Files/BitNami Redmine Stack/ruby/l
ib/ruby/gems/1.8/gems/rcov-1.0.0 for inspection.
Results logged to C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/
gems/rcov-1.0.0/ext/rcovrt/gem_make.out
Before this message BitNami told me to install the DevKit. I installed the DevKit, did edit the confiy.yml (- C:/Program Files/BitNami Redmine Stack/ruby -- maybe this was my fault because I don´t wrote the "") and startet the DevKit installation. Everything was fine but it´s not possible to install the gem. In my opinion it was a very bad idea to install Redmine into a folder with spaces.
I searched for a solution but none solution did work ;-(
Solution 1: I substed the BitNami path to X, tried the installation but that didn´t work.
Solution 2: Use the Microsoft C++ Express advice (http://minimalbugs.com/questions/how-to-install-gem-rcov-on-windows)
Solution 3: An older version of rcov (like 0.9.11) also didn´t work
If I try to install the rdiscount gem I got a similar error (Makefile 130 / 124 / ... C:/Program/...).
Now I need help ;-)
My gems:
*** LOCAL GEMS ***
actionmailer (3.2.6, 2.3.14)
actionpack (3.2.6, 2.3.14)
activemodel (3.2.6)
activerecord (3.2.6, 2.3.14)
activeresource (3.2.6, 2.3.14)
activesupport (3.2.6, 2.3.14)
addressable (2.2.8)
after_commit (1.0.10)
allison (2.0.3)
arel (3.0.2)
aws-sdk (1.5.5, 1.5.2)
bcrypt-ruby (3.0.1 x86-mingw32)
bluecloth (2.1.0 x86-mingw32)
builder (3.0.0, 2.1.2)
bundler (1.1.4, 1.0.21)
capistrano (2.12.0, 2.9.0)
capybara (1.1.2)
cgi_multipart_eof_fix (2.5.0)
childprocess (0.3.3)
coderay (1.0.7, 1.0.6)
crack (0.3.1)
cucumber (1.2.1, 0.9.4)
cucumber-rails (1.3.0, 0.3.2)
daemons (1.1.8, 1.0.10)
delayed_job (3.0.3, 2.0.7)
diff-lcs (1.1.3, 1.1.2)
echoe (4.5.6)
edavis10-object_daddy (0.4.3)
erubis (2.7.0)
eventmachine (0.12.10)
fastercsv (1.5.5, 1.5.4)
ffi (1.0.9 x86-mingw32)
gem_plugin (0.2.3)
gemcutter (0.7.1)
gherkin (2.11.1 x86-mingw32, 2.2.9 x86-mingw32)
gruff (0.3.6)
highline (1.6.13, 1.6.8)
hike (1.2.1)
hoe (3.0.6, 2.12.4)
hpricot (0.8.5 i386-mswin32)
httparty (0.8.3, 0.8.1)
i18n (0.6.0, 0.4.2)
journey (1.0.4, 1.0.3)
json (1.4.6 x86-mingw32)
json_pure (1.7.3, 1.6.3)
libwebsocket (0.1.3)
mail (2.4.4)
memcache-client (1.8.5)
metaclass (0.0.1)
mime-types (1.19, 1.18)
mini_magick (3.4, 3.3)
mocha (0.11.4, 0.10.5)
mongrel (1.1.5 x86-mingw32)
mongrel_cluster (1.0.5)
mongrel_service (0.4.0)
multi_json (1.3.6, 1.1.0)
multi_xml (0.5.1, 0.4.1)
mysql (2.8.1 x86-mingw32)
needle (1.3.0)
net-ldap (0.3.1)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.5.2, 2.2.1)
net-ssh-gateway (1.1.0)
nokogiri (1.5.5 x86-mingw32, 1.5.0 x86-mingw32, 1.4.4 x86-mingw32)
polyglot (0.3.3)
prototype-rails (3.2.1)
rack (1.4.1, 1.1.3)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.1, 0.5.7)
rails (3.2.6, 2.3.14)
rails_analyzer_tools (1.4.0)
railties (3.2.6)
rake (0.9.2.2)
rake-compiler (0.8.1, 0.7.9)
rdoc (3.12, 3.11)
RedCloth (4.2.9 x86-mingw32)
riddle (1.5.2, 1.5.0)
rmagick (2.12.0)
rspec (2.10.0, 2.7.0)
rspec-core (2.10.1, 2.7.1)
rspec-expectations (2.10.0, 2.7.0)
rspec-mocks (2.10.1, 2.7.0)
ruby-openid (2.1.8)
rubyforge (2.0.4)
rubyzip (0.9.9)
selenium-webdriver (2.24.0)
simplecov (0.6.4)
simplecov-html (0.5.3)
sprockets (2.4.3, 2.1.3, 2.1.2)
sqlite3 (1.3.6 x86-mingw32, 1.3.5 x86-mingw32)
sqlite3-ruby (1.3.2 x86-mingw32)
subexec (0.2.2, 0.1.0)
SyslogLogger (1.4.1, 1.4.0)
term-ansicolor (1.0.7)
thin (1.3.1)
thinking-sphinx (2.0.12, 1.4.10)
thor (0.15.3, 0.14.6)
tilt (1.3.3)
treetop (1.4.10, 1.4.5)
tzinfo (0.3.33)
uuidtools (2.1.2)
webrat (0.7.3)
xpath (0.1.4)
yard (0.8.2.1, 0.8.1)
I had the same error. Everything solved it self by changing the installation location of the Bitnami Redmine Stack. Default location is C:\Program Files\Bitnami Redmine Stack\
The "make" which is included in the DevKit can't handle spaces in the pathname.
I installed the bitnami stack to C:\BitNamiRedmine\ and now everything works perfectly.
Install Bitname Redmine to a path without spaces, e.g. C:\BitNamiRedmine\
Download the Ruby Development Kit -> http://rubyinstaller.org/downloads/
Extract the DevKit to C:\BitNamiRedmine\ruby\devkit\
use_redmine.bat
cd ruby\devkit
run ruby dk.rb init
add »- "C:/BitNamiRedmine/ruby"« (without »«, Important: Forward-Slashes!) to the config.yml in the DevKit folder
run ruby dk.rb install
Done!
Now you can navigate to your apps/redmine/htdocs folder and run gem install rcov.
Tested on Windows Server 2008 R2.
I am trying to install Gitorious in my local computer. However I get this error when I execute the console application:
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:194:in
block in stub_source_index170':
undefined methodskip_during' for
Bundler::RubygemsIntegration::Deprecate:Class
(NoMethodError)
The ruby code that is executing in /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb is:
def stub_source_index170(specs)
Gem::SourceIndex.send(:define_method, :initialize) do |*args|
#gems = {}
# You're looking at this thinking: Oh! This is how I make those
# rubygems deprecations go away!
#
# You'd be correct BUT using of this method in production code
# must be approved by the rubygems team itself!
#
# This is your warning. If you use this and don't have approval
# we can't protect you.
#
Deprecate.skip_during do
self.spec_dirs = *args
add_specs(*specs)
end
end
end
I guess the error occurs because the deprecate module is not loaded or something like that... I don't know ruby... but how can I try to correct it?
I have ruby 1.9.1p431 (2011-02-18 revision 30908) with gem 1.8.5
List of gems:
* LOCAL GEMS *
actionmailer (2.3.5) actionpack
(2.3.5) activerecord (2.3.8, 2.3.5)
activeresource (2.3.5) activesupport
(2.3.8, 2.3.5) acts-as-taggable-on
(2.0.6) builder (3.0.0) bundler
(1.0.15) chronic (0.3.0)
daemon_controller (0.2.6) daemons
(1.1.0) diff-lcs (1.1.2) echoe (4.3.1)
eventmachine (0.12.10)
exception_notification (1.0.20090728)
factory_girl (1.3.3) fastthread
(1.0.7) gemcutter (0.6.1) geoip
(0.8.9) hoe (2.8.0) json_pure (1.5.0)
mime-types (1.16) mocha (0.9.10) mysql
(2.8.1) oauth (0.4.4) paperclip
(2.2.9.2) passenger (3.0.7)
proxymachine (1.2.4) rack (1.0.1)
rails (2.3.5) rake (0.8.7) rdiscount
(1.3.1.1) revo-ssl_requirement (1.1.0)
riddle (1.2.2) rmagick (2.13.1)
ruby-hmac (0.4.0) ruby-openid (2.1.8)
ruby-yadis (0.3.4) rubyforge (2.0.4)
shoulda (2.9.2) state_machine (0.9.4)
stomp (1.1) stompserver (0.9.9) tuxml
(0.0.1) validates_url_format_of
(0.1.1) will_paginate (2.3.15)
Many thanks in advance.
Carlos.
Newer versions of Rubygems are deprecating some old internal methods. You can downgrade Rubygems with gem update --system 1.x.y (e.g. 1.5.2) to see if that solves your problem.
Deprecate was namespaced to Gem::Deprecate. You can temporary patch it:
Gem::Deprecate.skip_during do
self.spec_dirs = *args
add_specs(*specs)
end
I hope someone can assist me. I have RubyMine 2.0.2 installed on Windows 7 32 bit computer. Since a week ago (I presume it must have been after I have update some gems) I cant seem to debug form the IDE. I am trying to debug a rake task which I could before. Running the rake task normally works perfect, just debug doesnt. Its not just limited to the rake, I cant debug any ruby files. I've tried installing older versions of debug-ide and debug-base but to no success. I've tried it with ruby 1.8.7 and 1.8.6 on different computers but nothing. Trying to search the web gave some information, which I've tried, but also no success. Im desperate to get this working. Below are the full error and my current settings:
Error:
C:\InstantRails\ruby\bin\ruby.exe -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) C:\InstantRails\ruby\bin/rdebug-ide --port 57167 -- C:/InstantRails/rails_apps/paperserve/lib/tasks/poll_snmp.rake
Fast Debugger (ruby-debug-ide 0.4.9) listens on :57167
C:/InstantRails/rails_apps/paperserve/lib/tasks/poll_snmp.rake:5
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-debug ide.rb:109:in `debug_load'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-debug ide.rb:109:in `debug_program'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/bin/rdebug-ide:87
C:\InstantRails\ruby\bin/rdebug-ide:19:in `load'
C:\InstantRails\ruby\bin/rdebug-ide:19
-e:1:in `load'
-e:1
Uncaught exception: undefined method `namespace' for main:Object
Process finished with exit code 1
Code snippet (It fails at the start of namespace. If I remove this, it fails on the next line, etc, etc)
#This script should run every 15 minutes
require 'snmp'
require 'yaml'
namespace :cdeweb do
RubyGems Environment:
RUBYGEMS VERSION: 1.3.7 RUBY VERSION:
1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] INSTALLATION
DIRECTORY:
C:/InstantRails/ruby/lib/ruby/gems/1.8
RUBY EXECUTABLE:
C:/InstantRails/ruby/bin/ruby.exe
EXECUTABLE DIRECTORY:
C:/InstantRails/ruby/bin RUBYGEMS
PLATFORMS:
ruby
x86-mswin32-60
GEM PATHS:
C:/InstantRails/ruby/lib/ruby/gems/1.8
C:/Users/Paul.LPFSYSTEMS/.gem/ruby/1.8
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
http://rubygems.org/
* LOCAL GEMS *
actionmailer (2.3.5, 2.0.2)
actionpack (2.3.5, 2.0.2)
activerecord (2.3.5, 2.0.2)
activeresource (2.3.5, 2.0.2)
activesupport (2.3.5, 2.0.2)
capistrano (2.5.18, 2.1.0)
cgi_multipart_eof_fix (2.5.0)
cmdparse (2.0.2) columnize (0.3.1)
fxri (0.3.7, 0.3.6) fxruby (1.6.12 mswin32)
gem_plugin (0.2.3)
highline(1.5.2, 1.4.0)
hpricot (0.8.2 x86-mswin32, 0.6 mswin32)
inaction_mailer (0.6)
json (1.4.2 x86-mswin32)
json_pure (1.4.2)
linecache (0.43 mswin32)
log4r (1.1.7, 1.0.5)
mongrel (1.1.5 x86-mswin32-60, 1.1.2 mswin32)
mysql(2.8.1 x86-mswin32, 2.7.3 mswin32)
needle (1.3.0)
net-scp (1.0.2)
net-sftp (2.0.4, 1.1.0)
net-ssh (2.0.22, 1.1.2)
net-ssh-gateway (1.0.1)
rack (1.0.1)
rails (2.3.5, 2.0.2)
rake (0.8.7, 0.8.1, 0.8.0, 0.7.3)
ruby-debug-base (0.10.3 mswin32)
ruby-debug-ide (0.4.9)
ruby-net-ldap (0.0.4)
rubygems-update (1.3.7, 1.3.6, 1.0.1)
snmp (1.0.2)
sources (0.0.1)
sqlite3-ruby (1.2.5 x86-mswin32, 1.2.1 mswin32)
win32-api (1.4.6 x86-mswin32-60, 1.0.4 mswin32)
win32-clipboard (0.5.2, 0.4.3)
win32-dir (0.3.6, 0.3.2)
win32-eventlog (0.5.2, 0.4.6)
win32-file (0.6.3, 0.5.4)
win32-file-stat (1.3.4, 1.2.7)
win32-process (0.6.2, 0.5.3)
win32-sapi (0.1.5, 0.1.4)
win32-sound (0.4.2, 0.4.1)
windows-api (0.4.0, 0.2.0)
at least ruby-mine 2.0.1 does not work with the latest ruby-debug-ide (0.4.9)
see http://pivotallabs.com/users/david/blog/articles/1167-make-the-rubymine-2-0-1-debugger-work-for-you-