No such file or directory - /dev/null (Errno::ENOENT) - ruby-on-rails

I'm having a similar problem to this gentleman here.
I've been trying to run a cucumber feature via a rake task. And I've been picking up the specified error in the title.
Here's a full backtrace. And my ruby version. (When I attempted to run the rails version command, I got "command not found".
$ rake features:all --trace
** Invoke features:all (first_time)
** Invoke features:watir_webdriver (first_time)
** Execute features:watir_webdriver
c:/Ruby193/bin/ruby -S bundle exec cucumber --profile watir
Using the watir profile...
No such file or directory - /dev/null (Errno::ENOENT)
c:/Ruby193/lib/ruby/1.9.1/webrick/log.rb:34:in `initialize'
c:/Ruby193/lib/ruby/1.9.1/webrick/log.rb:34:in `open'
c:/Ruby193/lib/ruby/1.9.1/webrick/log.rb:34:in `initialize'
c:/Ruby193/lib/ruby/1.9.1/webrick/log.rb:124:in `initialize'
c:/code/page-object/features/sample-app/sample_app.rb:12:in `new'
c:/code/page-object/features/sample-app/sample_app.rb:12:in `start'
c:/code/page-object/features/support/ajax_text_environment.rb:6:in `block in run'
rake aborted!
Command failed with status (1): [c:/Ruby193/bin/ruby -S bundle exec cucumbe...]
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.1.9/lib/cucumber/rake/task.rb:104:in `run'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.1.9/lib/cucumber/rake/task.rb:193:in `block in define_task'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
c:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
c:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
c:/Ruby193/bin/rake:19:in `load'
c:/Ruby193/bin/rake:19:in `<main>'
Tasks: TOP => features:all => features:watir_webdriver
And ruby version
ruby -v
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
Any help would be infinitely appreciated. Thanks.

the dev/null was in config/initializers/quiet_assets and I replaced dev/null with logger.txt

if you are working on the same application on *nix and windows you could replace '/dev/null'
with RUBY_PLATFORM != 'i386-mingw32' ? '/dev/null' : 'NUL'
for me it was in quiet_assets.rb and I replaced
Rails.application.assets.logger = Logger.new('/dev/null')
with
Rails.application.assets.logger = Logger.new(RUBY_PLATFORM != 'i386-mingw32' ? '/dev/null' : 'NUL')

I actually figured it out. There was a configuration setting in the application I'm working on in one of the slightly obscured files. It set the path of the logger to "/dev/null". I just changed it to "logger.txt" and it works now.

Related

Redmine receiving emails from imap

I have installed Redmine 2.6.1-stable, it works using apache2 and passenger.
I'm trying to receive emails using imap with this two rakes:
this one:
rake -f /opt/redmine-2.6.1/Rakefile --silent redmine:email:receive_imap RAILS_ENV="production" host=smtp.yandex.ru port=465 username=mail#yandex.ru password=pwd ssl=true project=desk folder=INBOX move_on_success=processed move_on_failure=failed no_permission_check=1 unknown_user=accept
And this one:
bundle exec rake redmine:email:receive_imap host='smtp.yandex.ru' username='mail#yandex.ru' password='pwd' port=465 ssl=true starttls=true allow_override=type,project project=desk
And this is log:
** Invoke redmine:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_imap
rake aborted!
EOFError: end of file reached
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/imap.rb:1150:in `get_tagged_response'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/imap.rb:1210:in `block in send_command'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/imap.rb:1192:in `send_command'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/imap.rb:435:in `login'
/opt/redmine-2.6.1/lib/redmine/imap.rb:30:in `check'
/opt/redmine-2.6.1/lib/tasks/email.rake:128:in `block (4 levels) in <top (required)>'
/opt/redmine-2.6.1/app/models/mailer.rb:367:in `with_synched_deliveries'
/opt/redmine-2.6.1/lib/tasks/email.rake:127:in `block (3 levels) in <top (required)>'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/bin/rake:23:in `load'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/bin/rake:23:in `<main>'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/bin/ruby_executable_hooks:15:in `eval'
/home/admin/.rvm/gems/ruby-2.1.5#rails3/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine:email:receive_imap
I can't understand what's going on.. Why it does not work properly?
Log /opt/redmine-2.6.1/logs/production.log is empty about this operation.
I recently solved my similar problem with enabling debug on IMAP, so I could see what's happened. To do that;
vim /var/www/redmine/lib/redmine/imap.rb
and after require 'net/imap' add this line:
Net::IMAP.debug = true
It usually relates to the login credentials/method.
You are trying to receive IMAP email from an SMTP server. These are completely different protocols.
Likely you want server imap.yandex.ru, Port 993, with SSL (not starttls).
Settings for IMAP appear to be available at https://yandex.com/support/mail/mail-clients.xml

Derailed Benchmark Memory Over Time Fails

I'm trying to debug my rails application with the derailed_benchmarks gem. I am following the instructions on their Github. I can run my server locally in production, but when I try to execute the command derailed exec perf:mem_over_time I get the following error:
/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/lib/derailed_benchmarks/tasks.rb:92:in `call_app': Bad request: <html><body>You are being redirected.</body></html> (RuntimeError)
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/lib/derailed_benchmarks/tasks.rb:145:in `block (2 levels) in <top (required)>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
from /Users/cowan/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/bin/derailed:41:in `exec'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/bin/derailed:85:in `<top (required)>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/derailed:23:in `load'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/derailed:23:in `<main>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
Any help is greatly appreciated.
My application uses puma, so I had to specify that when I ran the command.
$ USE_SERVER=puma derailed exec perf:mem_over_time

Rake aborted! Invalid byte sequence in UTF-8

This problem has been plaguing me for hours! When trying to precompile my assets on the AWS instance, I get the following:
bitnami#ip-10-117-75-230:/opt/bitnami/apache2/htdocs/my_broker_app$ sudo bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/opt/bitnami/ruby/bin/ruby /opt/bitnami/ruby/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
invalid byte sequence in UTF-8
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/hike-1.2.3/lib/hike/index.rb:82:in `block in entries'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/hike-1.2.3/lib/hike/index.rb:82:in `reject'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/hike-1.2.3/lib/hike/index.rb:82:in `entries'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:116:in `entries'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:190:in `block in each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:190:in `block in each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:190:in `block in each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:190:in `block in each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:185:in `each_entry'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:18:in `compile'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:56:in `internal_precompile'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/opt/bitnami/ruby/bin/rake:23:in `load'
/opt/bitnami/ruby/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/opt/bitnami/ruby/bin/ruby /opt/bitnami/ru...]
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils.rb:80:in `ruby'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `ruby'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/opt/bitnami/ruby/bin/rake:23:in `load'
/opt/bitnami/ruby/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile
I am running ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]
I solved the issue by doing the following:
$ cd opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/hike-1.2.3/lib/hike
$ sudo chmod 777 index.rb
$ sudo vim index.rb
Then, insert (press letter i on keyboard): # encoding: utf-8 before first line.
Hit esc and then type :wq then press enter to save.
After, put permissions back for index.rb by doing the following
$ sudo chmod 644 index.rb
Hope this helps someone in the future.
In case anybody else comes across this question, while Tomanow's answer didn't quite work for me, I discovered there were offending characters in my file, which is what caused this issue.
The files, which came from Open Layers version 2.13, contained a copyright symbol in the comments section of some of their javascript and css files. Anybody else having a similar issue could also attempt to look for and remove those characters, if that's a feasible. Check out this answer for more details.
In my case the issue was happening on every rake task. I found out that it was due to the presence of some files with odd names that were accidentally created on the app's main directory, such as "?," and "\342,". Everything worked fine after I removed them.

Gitlab rake gitlab:check fails on Mountain Lion Server

I'm trying to install Gitlab on an 10.8.2 Server but when I execute
bundle exec rake gitlab:check RAILS_ENV=production
I'm getting the following error.
Checking Environment ...
gitlab user is in gitg group? ... yes
Has no "-e" in ~gitolite/.profile ... yes
Git configured for gitlab user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
** Invoke gitlab:gitolite:check (first_time)
** Invoke environment
** Execute gitlab:gitolite:check
Checking Gitolite ...
Using recommended version ... no
Try fixing it:
We strongly recommend using the version pointed out in the installation guide.
For more information see:
doc/install/installation.md in section "Gitolite"
Repo umask is 0007 in .gitolite.rc? ... yes
Allow all Git config keys in .gitolite.rc ... yes
Config directory exists? ... yes
Config directory owned by gitolite:gitg ... rake aborted!
undefined method `split' for nil:NilClass
/Users/gitlab/Opt/rails/gitlabhq/lib/tasks/gitlab/task_helpers.rake:81:in `gid_for'
/Users/gitlab/Opt/rails/gitlabhq/lib/tasks/gitlab/check.rake:533:in `check_dot_gitolite_user_and_group'
/Users/gitlab/Opt/rails/gitlabhq/lib/tasks/gitlab/check.rake:400:in `block (3 levels) in <top (required)>'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/gitlab/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:187:in `block in invoke_prerequisites'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:185:in `each'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:185:in `invoke_prerequisites'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
/Users/gitlab/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/bin/rake:19:in `load'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374#global/bin/rake:19:in `<main>'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `eval'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `<main>'
I literally checked the permissions a thousand time, if anyone can get me a hint on the problem this would be great.
This seems to be an issue in progress: see Issue 2890.
The commit e0d62d9c might fix this problem, in lib/tasks/gitlab/task_helpers.rake.
def gid_for(group_name)
- group_line = File.read("/etc/group").lines.select{|l| l.start_with?("#{group_name}:")}.first
- group_line.split(":")[2].to_i
+ Etc.getgrnam(group_name).gid
end

Getting undefined method `name' for "actionmailer":String when installing Webistrano

When I try and run a RAKE on Webistrano I get the following error:
undefined method `name' for "actionmailer":String`
I am a not proficient in Ruby and RoR but I have installed and played about with plenty of applications before and I can't find what the issue is.
The command I am running is:
RAILS_ENV=production rake db:migrate --trace
Which produces the below:
I would really like to know the best way to diagnose and fix this issue and issues like it in the future.
(in /srv/www/webistrano)
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `name' for "actionmailer":String
/srv/www/webistrano/vendor/rails/railties/lib/rails/gem_dependency.rb:268:in `=='
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:217:in `==='
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:217:in `block in matching_specs'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:411:in `block in each'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:410:in `each'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:410:in `each'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:216:in `find_all'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:216:in `matching_specs'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:238:in `to_specs'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
/srv/www/webistrano/vendor/rails/railties/lib/rails/gem_dependency.rb:73:in `add_load_paths'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `block in add_gem_load_paths'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `each'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:132:in `process'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:113:in `run'
/srv/www/webistrano/config/environment.rb:16:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `block in require'
/srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/srv/www/webistrano/vendor/rails/railties/lib/tasks/misc.rake:4:in `block in <top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => db:migrate => environment
When I run ruby -v I get the following:
ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]
I had this problem.
The solution is to downgrade rubygems to a version you support.
I needed version 1.3.5 (for rails 2.3.5)
So you need to do:
gem install rubygems-update -v 1.3.5
update_rubygems --version=1.3.5
And now rake should work.
This worked for me.
rvm rubygems 1.6.2

Resources