enter image description here
laravel homestead fails to install vagrant
git bash error
git bash codes don't work
windows 10 vagrant install test
problem:
C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process_builder.rb:44:in encode!': "\xC4" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to UTF-16LE (Encoding::UndefinedConversionError) from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process_builder.rb:44:in to_wide_string'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process_builder.rb:67:in create_environment_pointer' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process_builder.rb:28:in start'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process.rb:70:in launch_process' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/abstract_process.rb:81:in start'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/subprocess.rb:155:in block in execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:26:in block (2 levels) in safe_chdir'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:25:in chdir' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:25:in block in safe_chdir'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:24:in synchronize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:24:in safe_chdir'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/subprocess.rb:154:in execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/subprocess.rb:22:in execute'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/powershell.rb:174:in version' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/powershell.rb:195:in validate_install!'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/powershell.rb:96:in execute_cmd' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/platform.rb:82:in block in windows_admin?'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/platform.rb:84:in windows_admin?' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/hyperv/provider.rb:20:in usable?'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:361:in block in default_provider' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/registry.rb:49:in block in each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/registry.rb:48:in each' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/registry.rb:48:in each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:347:in default_provider' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:943:in guess_provider'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:955:in find_configured_plugins' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:983:in process_configured_plugins'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:178:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/bin/vagrant:168:in new'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/bin/vagrant:168:in `'
You should go to "C:\HashiCorp\Vagrant\embedded\gems\2.2.14\gems\vagrant-2.2.14\bin" address and open "vagrant" file. At the beginning of the file, you will see "#!/usr/bin/env ruby" Paste the below 2 lines after this first line.
Encoding.default_external = Encoding.find('Windows-1251')
Encoding.default_internal = Encoding.find('Windows-1251')
Be careful, they are "1251", not "1250".
Related
I'm trying to compile my SCSS file but I always get this error. This is new because before the Windows 10 Creator Update it was working fine.
Here's the error :
$ sass --no-cache --update --trace app.scss:app.css
c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:516:in `initialize': Permission denied # rb_sysopen - appp.css (Errno::EACCES)
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:516:in `open'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:516:in `write_file'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:503:in `update_stylesheet'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:209:in `each'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb:209:in `update_stylesheets'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/plugin.rb:82:in `update_stylesheets'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/exec/sass_scss.rb:340:in `watch_or_update'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/exec/sass_scss.rb:51:in `process_result'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/exec/base.rb:52:in `parse'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/lib/sass/exec/base.rb:19:in `parse!'
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.4.25/bin/sass:13:in `<top (required)>'
from c:/Ruby24-x64/bin/sass:23:in `load'
from c:/Ruby24-x64/bin/sass:23:in `<main>'
I checked where the compiler fail and this is what I got :
513 def write_file(fileName, content)
514 flag = 'w'
515 flag = 'wb' if Sass::Util.windows? && options[:unix_newlines]
516 File.open(fileName, flag) do |file|
517 file.set_encoding(content.encoding) unless Sass::Util.ruby1_8?
518 file.print(content)
519 end
520 end
Just found the problem. For whatever reason, if the file is in a path with spaces it won't work. I moved the folder to a "safe address" and it works like a charm.
I have Ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] and when I'm trying to use Wordmove, I'm getting following pull error:
▬▬ ✓ Pulling Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
local | mysqldump --host=localhost --user=USER --password=PASS wpDB > /var/www/local/wp-content/local-backup-1421774302.sql
remote | mysqldump --host=localhost --user=USER --password=PASS wpDB > /var/www/site/wp-content/dump.sql
remote | get: /var/www/site/wp-content/dump.sql /var/www/local/wp-content/dump.sql
remote | delete: /var/www/site/wp-content/dump.sql
local | adapt dump
/var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/sql_adapter.rb:44:in `gsub!': invalid byte sequence in UTF-8 (ArgumentError)
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/sql_adapter.rb:44:in `serialized_replace!'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/sql_adapter.rb:36:in `replace_field!'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/sql_adapter.rb:25:in `replace_vhost!'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/sql_adapter.rb:17:in `adapt!'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/deployer/base.rb:182:in `adapt_sql'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/deployer/ssh.rb:35:in `pull_db'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/cli.rb:47:in `block in pull'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/cli.rb:34:in `block in handle_options'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/cli.rb:32:in `each'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/cli.rb:32:in `handle_options'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/lib/wordmove/cli.rb:46:in `pull'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /var/lib/gems/1.9.1/gems/wordmove-1.2.0/bin/wordmove:6:in `<top (required)>'
from /usr/local/bin/wordmove:23:in `load'
from /usr/local/bin/wordmove:23:in `<main>'
Other websites run in the very same environment does not show this error. Does anyone have any idea, what can be casuing this error?
Add
sql_content.encode!('UTF-16', 'UTF-8', :invalid => :replace, :replace => '')
sql_content.encode!('UTF-8', 'UTF-16')
sql_content.force_encoding("UTF-8")
to this File,above the line 45
/root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/sql_adapter/default.rb
or this File
/var/lib/gems/2.7.0/gems/wordmove-5.2.2/lib/wordmove/sql_adapter/default.rb
Ref: https://github.com/welaika/wordmove/wiki/invalid-byte-sequence-in-UTF-8-while-pushing---pulling-db
I am creating an application/site in laravel 4. I am setting up Laravel with laravel-guard which helps build assets really easily and creates modular set ups so you can minify css and js quickly.
I am running through everything as expected here
I have got the correct ruby version etc running so thats cool.
When I run the command php artisan guard:make it works perfectly fine but when I try and run
php artisan guard:watch
I get some really weird errors on there and they do not work well at all.
The errors I am getting are:
17:21:54 - ERROR - Could not load 'guard/phpunit' or find class Guard::Phpunit
17:21:54 - ERROR - /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:746:in `activate'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in `try_activate'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/plugin_util.rb:100:in `plugin_class'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/plugin_util.rb:57:in `initialize_plugin'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard.rb:167:in `add_plugin'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/dsl.rb:166:in `guard'
> [#] /Freelance/Current Projects/knight-dragon/knightdragon/Guardfile:12:in `_instance_eval_guardfile'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/guardfile/evaluator.rb:121:in `instance_eval'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/guardfile/evaluator.rb:121:in `_instance_eval_guardfile'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/guardfile/evaluator.rb:37:in `evaluate_guardfile'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/setuper.rb:144:in `evaluate_guardfile'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/setuper.rb:62:in `setup'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/commander.rb:24:in `start'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/cli.rb:96:in `start'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/bin/guard:6:in `<top (required)>'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/guard:19:in `load'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/guard:19:in `<main>'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `eval'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `<main>'
17:21:54 - ERROR - Invalid Guardfile, original error is:
> [#] undefined method `superclass' for nil:NilClass
This is what is in my gem list:
guard (2.2.1, 1.4.0)
guard-coffeescript (1.3.4)
guard-concat (0.0.3)
guard-livereload (2.0.0)
guard-phpunit (0.1.4)
guard-sass (1.3.2)
I have looked at my gems list and it seems to be there so I cannot figure it out at all.
Does anyone know why this would happen?
There is a problem related yo Guard::PHPUnit, I also could not make it work. If you don't need PHPUnit, a workaround: edit your Guardfile and comment this block:
#guard :phpunit, :all_on_start => false, :tests_path => 'app/tests/', :cli => '--colors -c phpunit.xml', :require => false do
# # Run any test in app/tests upon save.
# watch(%r{^.+Test\.php$})
#
# # When a view file is updated, run tests.
# # Tip: you probably only want to run your integration tests.
# watch(%r{app/views/.+\.php}) { Dir.glob('app/tests/**/*.php') }
#
# # When a file is edited, try to run its associated test.
# # Save app/models/User.php, and it will run app/tests/models/UserTest.php
# watch(%r{^app/(.+)/(.+)\.php$}) { |m| "app/tests/#{m[1]}/#{m[2]}Test.php"}
#end
Now it should work, but PHPUnit will be disabled:
php artisan guard:watch
sudo gem install guard-phpunit2
And edit:phpunit -> phpunit2
guard :phpunit2, :all_on_start => false, :tests_path => 'app/tests/', :cli => '--colors -c phpunit.xml' do
# Run any test in app/tests upon save.
watch(%r{^.+Test\.php$})
# When a view file is updated, run tests.
# Tip: you probably only want to run your integration tests.
watch(%r{app/views/.+\.php}) { Dir.glob('app/tests/**/*.php') }
# When a file is edited, try to run its associated test.
# Save app/models/User.php, and it will run app/tests/models/UserTest.php
watch(%r{^app/(.+)/(.+)\.php$}) { |m| "app/tests/#{m[1]}/#{m[2]}Test.php"}
end
Rspec book says to run cucumber features -n command. But it is giving following error
missing argument: -n (OptionParser::MissingArgument)
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber- 1.2.1/lib/cucumber/cli/options.rb:119:in `parse!'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/configuration.rb:25:in `parse!'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:55:in `configuration'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:63:in `run_drb_client'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:34:in `execute!'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:20:in `execute'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/bin/cucumber:14:in `<top (required)>'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/bin/cucumber:19:in `load'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/bin/cucumber:19:in `<main>'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `eval'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `<main>'
from the cucumber source:
opts.on("-n NAME", "--name NAME",
"Only execute the feature elements which match part of the given name.",
"If this option is given more than once, it will match against all the",
"given names.")
so you would need to call -n name_of_the_feature
deltrem#deltrem-desktop:~/ramaze web/app/blog$ ruby start.rb
I [2010-06-10 14:53:33 $1886] INFO | : activating sequel
I [2010-06-10 14:53:33 $1886] INFO | : Installing sequel
/usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:124:in `initialize': Permission denied - /home/deltrem/.gem/ruby/1.8/cache/sequel-3.9.0.gem (Errno::EACCES)
from /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:124:in `open'
from /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:124:in `download'
from /usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:257:in `install'
from /usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:247:in `each'
from /usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:247:in `install'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:91:in `install_gem'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:102:in `temp_argv'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:89:in `install_gem'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:80:in `setup_gem'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:63:in `setup'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:62:in `each'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:62:in `setup'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:44:in `run'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:38:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:29:in `new'
from /usr/lib/ruby/gems/1.8/gems/ramaze-2010.04.04/lib/ramaze/setup.rb:29:in `setup'
from ./app.rb:4
from start.rb:3:in `require'
from start.rb:3
I have no idea what this is for, but the error message seems pretty clear:
Permission denied - /home/deltrem/.gem/ruby/1.8/cache/sequel-3.9.0.gem (Errno::EACCES)
You don't have permission to read or write to that path. Are you supposed to sudo this?