RubyMotion Error : tool 'xcodebuild' requires Xcode - rubymotion

I created a new RubyMotion project using:
motion create NewMotion
Then I installed related bundles:
bundle install
Now whenever I run the app I'm getting an error:
➜ NewMotion rake
/Users/info/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local in PATH, mode 040777
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/Library/RubyMotion/lib/motion/project/xcode_config.rb:87:in `xcode_version'
/Library/RubyMotion/lib/motion/project/xcode_config.rb:99:in `validate'
/Library/RubyMotion/lib/motion/project/template/ios/config.rb:85:in `validate'
/Library/RubyMotion/lib/motion/project/config.rb:115:in `setup'
/Library/RubyMotion/lib/motion/project/app.rb:66:in `config'
/Library/RubyMotion/lib/motion/project/template/ios.rb:81:in `block in <top (required)>'
/Users/info/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/Users/info/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => default => simulator
(See full trace by running task with --trace)
Please note that I'm using Ruby ruby 2.0.0p353.
Any help would be highly appreciated.
Cheers

Ok seems I got how I solve this problem:
Install Xcode from the developer.apple.com
Point xcode-select to the Xcode Developer Directory
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Related

Issue regarding setup the cronjob for issue reminder

I have wrote a script for issue reminder
cd /var/www/redmine
/usr/local/rvm/gems/ruby-2.2.5/wrappers/rake reminder:exec RAILS_ENV="production
But while running the above script getting error
/usr/local/rvm/gems/ruby-2.2.5/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot"
rake aborted!
Don't know how to build task 'reminder:exec' (see --tasks)
/usr/local/rvm/gems/ruby-2.2.5/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
The rake task seems to be added by the redmine_mail_reminder plugin. Since the task can not be found apparently, you probably don't have this plugin installed properly (or at all).
It is also possible that you are not in the correct directory. For the rake task to work, you have to change to the root directory of Redmine, i.e. the directory containing the app, lib and plugins directories as well as the Gemfile.
Finally, Redmine itself can send reminders without the use of plugins with the use of a different rake task which is shipped with Redmine itself:
bundle exec rake redmine:send_reminders days=7 RAILS_ENV="production"
See RedmineReminderEmails for details.

File not found error while testing python impyla

I am trying to set up a connection between python and impala. Based on the instructions here I am trying to set up impyla.
I am on a vagrant ubuntu/xenial64 box with python 2.7.12. After reading about some issues with the latest thrift I downgraded to the specified version. After pip installing and setting up the environment variables, I am trying to run the test but it is failing with the file not found error, as follows:
ubuntu#ubuntu-xenial:~/.local/lib/python2.7/site-packages/impala$ py.test --connect impyla
======================================== test session starts ========================================
platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /home/ubuntu/.local/lib/python2.7/site-packages/impala, inifile:
=================================== no tests ran in 0.00 seconds ====================================
ERROR: file not found: impyla
ubuntu#ubuntu-xenial:~/.local/lib/python2.7/site-packages/impala$
I think I am missing out on something very fundamental here. I have no previous experience with python tests. I would like to stick with python 2.7 because of some other dependencies.
PS:
Please note the latest version provided in the repo readme is 0.13.1 but with my pip install impyla it came out to be 0.14.0.
I am running the test from my site-package/impala directory as the readme says to be in the directory where impyla is.
There is no mention of any inifile in the readme (as far as I could see.)
EDIT 1:
When I run it from site-package directory without --connect I get the same error. But with the argument, it says that the argument is unrecognizable. The output is as follows:
ubuntu#ubuntu-xenial:~/.local/lib/python2.7/site-packages$ py.test --connect impyla
usage: py.test [options] [file_or_dir] [file_or_dir] [...]
py.test: error: unrecognized arguments: --connect
inifile: None
rootdir: /home/ubuntu/.local/lib/python2.7/site-packages
ubuntu#ubuntu-xenial:~/.local/lib/python2.7/site-packages$
Any help on how to troubleshoot this would be helpful.

Unable to start my Unicorn on Port 80 on Capistrano 3

I get the following error while trying to run
"cap production unicorn:start"
DEBUG [29ec5890] Command: cd /home/ec2-user/apps/current && ( RAILS_ENV=production BUNDLE_GEMFILE=/home/ec2-user/apps/current/Gemfile ~/.rvm/bin/rvm default do bundle exec unicorn -c /home/ec2-user/apps/current/config/unicorn/production.rb -E deployment -D )
DEBUG [29ec5890] RVM is not a function, selecting rubies with 'rvm use ...' will not work.
DEBUG [29ec5890]
DEBUG [29ec5890] You need to change your terminal emulator preferences to allow login shell.
DEBUG [29ec5890] Sometimes it is required to use `/bin/bash --login` as the command.
DEBUG [29ec5890] Please visit https://rvm.io/integration/gnome-terminal/ for a example.
DEBUG [29ec5890]
DEBUG [29ec5890] master failed to start, check stderr log for details
cap aborted!
bundle stdout: Nothing written
tail -f log/unicorn.log
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/socket_helper.rb:185:in `new_tcp_server'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/socket_helper.rb:165:in `bind_listen'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:242:in `listen'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:805:in `block in bind_new_listeners!'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:805:in `each'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:805:in `bind_new_listeners!'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:138:in `start'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/gems/unicorn-4.8.2/bin/unicorn:126:in `<top (required)>'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
from /home/ec2-user/apps/shared/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'
What should be configured to start the unicorn in port 80. Thanks in advance
Try following the advice on this response:
In my deploy.rb file, setting this line:
set :bundle_dir, "/usr/local/rvm/gems/ruby-X.X.X-pXXX"
before this line:
require 'bundler/capistrano'
seemed to help bundler know where to install the gems. Not sure why
this is needed. I've never needed it before.
EDIT
On capistrano3, if you are using gem rvm1-capistrano3, you might need to update it, as it is a fixed issue:
bundle update rvm1-capistrano3
Also, you should use the capistrano3 fork of capistrano-unicorn:
Add the library to your Gemfile:
group :development do
gem 'sepastian-capistrano3-unicorn', :require => false
end
... and remove the line
gem 'capistrano3-unicorn'

Heroku create command fails - no such file or directory

I am trying to deploy my first rails application to heroku, and unfortunately I am getting an error when running the heroku create command:
# C:\railsprojects\sample_app> heroku create
The system cannot find the path specified.
Creating protected-reaches-1026... done, stack is cedar
http://protected-reaches-1026.herokuapp.com/ | git#heroku.com:protected-reaches-1026.git
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: No such file or directory - git --version (Errno::ENOENT)
Backtrace: C:/Users/paul/.heroku/client/lib/heroku/helpers.rb:103:in ``'
C:/Users/paul/.heroku/client/lib/heroku/helpers.rb:103:in `has_git?'
C:/Users/paul/.heroku/client/lib/heroku/helpers.rb:108:in `git'
C:/Users/paul/.heroku/client/lib/heroku/helpers.rb:156:in `create_git_remote'
C:/Users/paul/.heroku/client/lib/heroku/command/apps.rb:255:in `create'
C:/Users/paul/.heroku/client/lib/heroku/command.rb:206:in `run'
C:/Users/paul/.heroku/client/lib/heroku/cli.rb:28:in `start'
C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'
Command: heroku create
Version: heroku/toolbelt/2.39.4 (i386-mingw32) ruby/1.9.3
My initial thought is that GIT is not in the path or otherwise cannot be called, but I eliminated that as part of the problem by simply running git --version:
# C:\railsprojects\sample_app> git --version
git version 1.8.3.msysgit.0
So, everything seems to be in order. Anyone else know what could be going wrong?
I am running Windows 7, and the version of the Heroku client is heroku/toolbelt/2.39.4 (i386-mingw32) ruby/1.9.3.
shouldn't you give the name of the application you want to create. Like heroku create application_name. That is what says in this link.

report_activate_error when setup windows service for mongrel

I try to install Redmine using this step: http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI_on_Windows_with_Apache
Works fine with some error than can be solved after searching on Google
But then, when on step Setup windows services(http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI_on_Windows_with_Apache#Setup-windows-services), I get this error message:
D:\xampp\rubyapp\redmine-1.3.0>mongrel_rails service::install -N mongrel_redmine_3001 -D "Mongrel serving Redmine on 3001" -p 3001 -e production -c D:
\xampp\rubyapp\redmine-1.3.0
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:900:in `report_activate_error': RubyGem version error: win32-service(0.5.2 not < 0.6.0, >= 0.5.2) (Gem::
LoadError)
from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:1276:in `gem'
from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel_service-0.3.4-x86-mswin32/lib/mongrel_service/init.rb:37:in `validate'
from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/command.rb:208:in `run'
from C:/Ruby187/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:281
from C:/Ruby187/bin/mongrel_rails:19:in `load'
from C:/Ruby187/bin/mongrel_rails:19
For information about my instalation:
Gem list:
D:\xampp\rubyapp\redmine-1.3.0>gem list
*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
cgi_multipart_eof_fix (2.5.0)
gem_plugin (0.2.3)
i18n (0.4.2)
mongrel (1.1.5 x86-mingw32)
mongrel_service (0.3.4 i386-mswin32)
mysql (2.8.1 x86-mingw32)
rack (1.1.0, 1.0.1, 1.0.0)
rails (2.3.5)
rake (0.9.2.2)
rdoc (2.4.2)
rubygems-update (1.6.2)
win32-service (0.5.2 mswin32)
D:\xampp\rubyapp\redmine-1.3.0>mongrel_rails --version
Mongrel Web Server 1.1.5
D:\xampp\rubyapp\redmine-1.3.0>ruby -v
ruby 1.8.7 (2011-12-28 patchlevel 357) [i386-mingw32]
How to solved this error ? I don't have any idea what to do
Uninstall mongrel_service and win32-service gems (gem unistall )
run "gem install mongrel_service" command. At this time this will install mongrel_service 0.4.0 instead of 0.3.4 which is installed per the guide. It seem to work and does not seem to depend on win32-service at all. YMMV.