I'm under nginx + passenger + rails 3.2.1 and when i try to start my app i get
cannot load such file -- rubygems/path_support
the output of gem environment is
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.23
- RUBY VERSION: 1.9.3 (2012-11-10 patchlevel 327) [i686-linux]
- INSTALLATION DIRECTORY: /root/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /root/.rbenv/versions/1.9.3-p327/bin/ruby
- EXECUTABLE DIRECTORY: /root/.rbenv/versions/1.9.3-p327/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /root/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1
- /root/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
and in my nginx.conf i have
user root;
http {
passenger_root /root/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/passenger-3.0.19;
passenger_ruby /root/.rbenv/versions/1.9.3-p327/bin/ruby;
passenger_default_user root;
passenger_default_group root;
....
what else can i check?
Thank you
thanks a lot ! the code in your config file saved my life:
passenger_default_user root;
passenger_default_group root;
I met the same error with your and solved with your config file , the detailed answer is here: https://stackoverflow.com/a/15777738/445908
Related
Version
5.0.1
Reproduction link
github.com
Environment info
Environment Info:
System:
OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU # 3.70GHz
Binaries:
Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
Yarn: 1.22.17 - /usr/bin/yarn
npm: 6.14.13 - ~/.nvm/versions/node/v14.17.1/bin/npm
Browsers:
Chrome: 98.0.4758.102
Firefox: 97.0
npmPackages:
#gtm-support/vue-gtm: ^1.3.0 => 1.3.0
#intlify/eslint-plugin-vue-i18n: ^1.2.0 => 1.2.0
#intlify/vue-devtools: 9.2.0-beta.22
#vue/apollo-option: ^4.0.0-alpha.15 => 4.0.0-alpha.15
#vue/babel-helper-vue-jsx-merge-props: 1.2.1
#vue/babel-helper-vue-transform-on: 1.0.2
#vue/babel-plugin-jsx: 1.1.1
#vue/babel-plugin-transform-vue-jsx: 1.2.1
#vue/babel-preset-app: 5.0.1
#vue/babel-preset-jsx: 1.2.4
#vue/babel-sugar-composition-api-inject-h: 1.2.1
#vue/babel-sugar-composition-api-render-instance: 1.2.4
#vue/babel-sugar-functional-vue: 1.2.2
#vue/babel-sugar-inject-h: 1.2.2
#vue/babel-sugar-v-model: 1.2.3
#vue/babel-sugar-v-on: 1.2.3
#vue/cli-overlay: 5.0.1
#vue/cli-plugin-babel: ^5.0.1 => 5.0.1
#vue/cli-plugin-eslint: ^5.0.1 => 5.0.1
#vue/cli-plugin-router: 5.0.1
#vue/cli-plugin-typescript: ^5.0.1 => 5.0.1
#vue/cli-plugin-unit-jest: ^5.0.1 => 5.0.1
#vue/cli-plugin-vuex: 5.0.1
#vue/cli-service: ^5.0.1 => 5.0.1
#vue/cli-shared-utils: 5.0.1
#vue/compiler-core: 3.2.30
#vue/compiler-dom: 3.2.30
#vue/compiler-sfc: 3.2.30
#vue/compiler-ssr: 3.2.30
#vue/component-compiler-utils: 3.3.0
#vue/devtools-api: 6.0.0-beta.20.1
#vue/eslint-config-airbnb: ^5.3.0 => 5.3.0
#vue/eslint-config-typescript: ^7.0.0 => 7.0.0
#vue/reactivity: 3.2.30 (3.2.31)
#vue/reactivity-transform: 3.2.30
#vue/runtime-core: 3.2.30 (3.2.31)
#vue/runtime-dom: 3.2.30 (3.2.31)
#vue/server-renderer: 3.2.30
#vue/shared: 3.2.30 (3.2.31)
#vue/test-utils: ^2.0.0-rc.18 => 2.0.0-rc.18
#vue/vue3-jest: ^27.0.0-alpha.4 => 27.0.0-alpha.4
#vue/web-component-wrapper: 1.3.0
eslint-plugin-vue: ^7.17.0 => 7.17.0
eslint-plugin-vue-scoped-css: ^1.3.0 => 1.3.0
floating-vue: ^2.0.0-beta.1 => 2.0.0-beta.1
jest-serializer-vue: 2.0.2
jest-serializer-vue-tjw: ^3.19.0 => 3.19.0
stylelint-config-recommended-vue: ^1.2.0 => 1.2.0
typescript: ^4.4.2 => 4.4.2
vue: ^3.2.30 => 3.2.30
vue-apollo: ^3.0.7 => 3.0.7
vue-chart-3: ^3.1.1 => 3.1.1
vue-cli-plugin-webpack-bundle-analyzer: ~4.0.0 => 4.0.0
vue-composition-test-utils: ^1.0.3 => 1.0.3
vue-ctk-date-time-picker3: ^2.5.2 => 2.5.2
vue-demi: 0.4.5 (0.12.1)
vue-eslint-parser: 7.10.0 (8.0.1)
vue-hot-reload-api: 2.3.4
vue-i18n: ^9.2.0-beta.22 => 9.2.0-beta.22
vue-loader: 17.0.0 (15.9.8)
vue-resize: 2.0.0-alpha.1
vue-router: ^4.0.12 => 4.0.12
vue-style-loader: 4.1.3
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
#vue/cli: 5.0.1
Steps to reproduce
HMR/Hot-reload doesn't work and in the console errors such as "The connection to wss://custom-url:8080/ws was interrupted while the page was loading.." will be thrown constantly. So something must be wrong with the devServer setup but I've tried many different setups and couldn't find a working one.
When I change anything in the templates I usually get similar errors such as:
Uncaught TypeError: can't access property "./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/views/Suppliers/Suppliers.vue?vue&type=script&lang=js", currentUpdate is undefined
What is expected?
HMR should work as it was before changing to the v5 plugins
What is actually happening?
HMR doesn't work, my changes are only visible if I reload the page
This is about an old vue 2.6.x project being migrated to vue 3 completely. Unfortunately it is about a monolith app so a complete reproduction wasn't possible, but I hope that posting all config files may be enough to find out the problem. If you need any other config files or anything else to help debug please let me know.
I see an error in the terminal as well:
Proxy error: Could not proxy request /app.e9978b73a5a9070c.hot-update.json from CUSTOM-URL:8080 to https://CUSTOM-URL/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).
Thanks for you help in advance!
My team could fix it by adding the optimization object to our webpack config (in vue.config.js):
const { defineConfig } = require('#vue/cli-service');
module.exports = defineConfig({
/* your config */
configureWebpack: {
optimization: {
runtimeChunk: 'single',
},
},
devServer: {
proxy: `https://${process.env.SANDBOX_HOSTNAME}/`, // we need this for apollo to work properly
host: '0.0.0.0',
allowedHosts: 'all',
},
});
It fixed the HMR for us, however if you're using firefox your console might be still spammed by error messages like these: The connection to wss://SANDBOX_HOSTNAME:8080/ws was interrupted while the page was loading.
I have cloned my repository an then install all packages via npm. When i try to start mu program with gatsby develop i get this error in all files in templates directory.
I've already cleared chache, deleted node_modules and public folders, re-install packages and so on, but nothing worked.
This is is info, which I get from gatsby info:
System:
OS: macOS 11.1
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU # 2.30GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.0.0 - ~/.nvm/versions/node/v14.0.0/bin/node
Yarn: 1.13.0 - ~/.npm-global/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v14.0.0/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 87.0.4280.141
Firefox: 78.0.2
Safari: 14.0.2
npmPackages:
gatsby: ^2.30.1 => 2.31.1
gatsby-awesome-pagination: ^0.3.6 => 0.3.6
gatsby-image: ^2.5.0 => 2.10.0
gatsby-plugin-eslint: ^2.0.8 => 2.0.8
gatsby-plugin-fontawesome-css: ^1.0.0 => 1.0.0
gatsby-plugin-manifest: ^2.6.1 => 2.11.0
gatsby-plugin-netlify-cms: ^4.5.0 => 4.9.0
gatsby-plugin-offline: ^3.4.0 => 3.9.0
gatsby-plugin-react-helmet: ^3.4.0 => 3.9.0
gatsby-plugin-sharp: ^2.8.0 => 2.13.1
gatsby-plugin-styled-components: ^3.5.0 => 3.9.0
gatsby-plugin-typography: ^2.10.0 => 2.11.0
gatsby-source-filesystem: ^2.5.0 => 2.10.0
gatsby-transformer-remark: ^2.12.0 => 2.15.0
gatsby-transformer-sharp: ^2.6.0 => 2.11.0
Does anyone have similar problem, or know how to solve it?
It's not a matter of dependencies or configuration, you have a typo in your project. It seems that somewhere in your JavaScript files (maybe in the templates folder) you have a . (dot) that is breaking your code.
To enable optional chaining in any JavaScript project, since it's not a standard feature, you need to:
Install the dependency (#babel/plugin-proposal-optional-chaining):
npm install --save-dev #babel/plugin-proposal-optional-chaining
Or:
yarn add #babel/plugin-proposal-optional-chaining --dev
Enable it in your Babel configuration. In Gatsby, you can create a babel.config.js (or .babelrc) in the root of your project to customize Babel's configuration:
{
"plugins": [
["#babel/plugin-proposal-optional-chaining"]
],
"presets": [
[
"babel-preset-gatsby",
{
"targets": {
"browsers": [">0.25%", "not dead"]
}
}
]
]
}
Fixed by:
problem was my package-lock.json. After we fixed it, everything works
properly :) nevermind
Version: rswag (2.0.5), rspec (3.8.0)
Environment: Rails 5.2.3, Ruby 2.4.5
It is my first time to use it, was stuck in authorization header for a day.
Here is what I did:
# in spec/swagger_helper.rb
config.swagger_docs = {
'api/v1/swagger.json' => {
swagger: '2.0',
info: {
title: 'API V1',
version: 'v1'
},
paths: {},
securityDefinitions: {
JWT: {
description: 'the jwt for API auth',
type: :apiKey,
name: 'Authorization',
in: :header
}
}
}
}
# in spec/integration/api/v1/nodes_spec.rb
path '/api/v1/nodes' do
get 'Get all servers' do
tags TAGS_NODE
produces 'application/json'
security [JWT: {}]
parameter name: :searchString, in: :query, type: :string
parameter name: :searchColumn, in: :query, type: :string
#parameter name: 'Authorization', :in => :header, :type => :string
let(:nodes) { create_list(:node_list, 32) }
response '200', 'Servers found' do
let(:'Authorization') { "Bearer #{gen_jwt}" }
let(:searchString) { 'test' }
let(:searchColumn) { ';Name;' }
run_test! do |repsonse|
data = JSON.parse(response.body)
puts data
end
end
end
end
Expected: The 'Bearer ....' is set in 'Authorization' header
Actual: In the test log, I found:
[INFO] [2019-09-29 01:11:13 UTC] [anony] [no session] [no req] [other other]Started GET "/api/v1/nodes?searchString=test&searchColumn=;Name;¶ms&headers[HTTP_AUTHORIZATION]=Bearer+eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1Njk3NjI2NzMsImVtYWlsIjoidGVzdEBpYm0uY29tIiwib3JnYW5pemF0aW9ucyI6WyJ0ZXN0X29yZzEiLCJvcmcyIl0sInJvbGVzIjpbImNjX2NvbnNvbGVfYWRtaW4iLCJyb2xlMiJdLCJpbnZlbnRvcnkiOlsidGVzdF9pbnYiXX0.eenTMWUy6kSHO58_kLKoKWmNjvQ9i5TU9ex4Ou-ausE&headers[HTTP_ACCEPT]=application%2Fjson" for 127.0.0.1 at 2019-09-29 01:11:13 +0000
[INFO] [2019-09-29 01:11:13 UTC] [anony] [no session] [no req] [other other]Processing by Api::V1::NodesController#index as HTML
......
[DEBUG] [2019-09-29 01:11:13 UTC] [anony] [no session] [no req] [other other]Auth by JWT token....
[ERROR] [2019-09-29 01:11:13 UTC] [anony] [no session] [no req] [other other]No JWT token included in request
As marked as bold in the log, the 'Authorization' as well as 'Accept' headers are appeared in query parameters, which are supposed to be http headers, so that no JWT token can be retrieved from header in code.
I also tried not to use securityDefinition, but specify a parameter in header as following: parameter name: 'Authorization', :in => :header, :type => :string. It did not work either.
Not sure any configuration I missed, or something wrong I did? Thanks!
Update: it seems to be related to other gems conflict? I had another try to create a new Rails 5 api only app, add rspec and rswag gems only, and run with a simple test case, it worked!
Here is my Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.4.5'
gem 'rails', '5.2.3'
gem 'puma', '3.11'
gem 'bootsnap', '1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
end
group :test do
# Test framework
gem "rspec-rails"
gem "database_cleaner", '1.6.0'
gem "simplecov"
gem "simplecov-rcov"
gem "factory_bot_rails", '5.1.0'
gem "ci_reporter_rspec"
gem "faker"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'pg', '1.1.4'
gem 'delayed_job_active_record', '4.1.3'
gem 'delayed_job_worker_pool', '0.2.3'
gem 'dalli', '2.7.8'
gem 'ruby-kafka', '0.7.5'
gem 'active_model_serializers', '0.10.10'
gem 'will_paginate', '3.1.7'
gem 'rest-client', '1.8.0'
gem 'symmetric-encryption', '4.3.0', require: false
gem 'unicorn', '5.2.0'
gem 'rubyzip', '1.2.2'
gem 'jwt', '2.2.1'
gem 'rubyXL', '3.3.30'
gem 'apartment', '2.2.1'
gem 'rswag', '2.0.5'
[Resolved]
Seems not working with Rack::Test::Methods
It worked after remove the line 'include Rack::Test::Methods" in a helper file, which was added previously to use 'get' to test the API.
Seems not working with Rack::Test::Methods
It worked after remove the line 'include Rack::Test::Methods" in a helper file, which was added previously to use 'get' to test the API.
I need to do some unit testing in my C project, which will be used in STM32F0 processor. I could test my abstraction code on x64 gcc, but the problem is i need a platform with little-endian (STM32F0 is little-endian by default). I tried to do some mods in project.yml file.
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE
:use_auxiliary_dependencies: TRUE
:build_root: build
# :release_build: TRUE
:test_file_prefix: test_
#:release_build:
# :output: MyApp.out
# :use_assembly: FALSE
:environment:
:extension:
:executable: .out
:paths:
:test:
- +:test/**
- -:test/support
:source:
- ../CDynTransport/src/
:support:
- test/support
:defines:
# in order to add common defines:
# 1) remove the trailing [] from the :common: section
# 2) add entries to the :common: section (e.g. :test: has TEST defined)
:commmon: &common_defines []
:test:
- *common_defines
- TEST
:test_preprocess:
- *common_defines
- TEST
:cmock:
:mock_prefix: mock_
:when_no_prototypes: :warn
:enforce_strict_ordering: TRUE
:plugins:
- :ignore
- :callback
:treat_as:
uint8: HEX8
uint16: HEX16
uint32: UINT32
int8: INT8
bool: UINT8
:tools:
:test_compiler:
:executable: arm-none-eabi-gcc
:arguments:
- "${1}"
- '-c'
- '-g'
- '-mcpu=cortex-m0'
- '-mthumb'
- '-Wall'
- '-Wno-address'
#- '-std=c99'
#- '-pedantic'
- -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE #expands to -I search paths
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR #expands to -I search paths
- -D$: COLLECTION_DEFINES_TEST_AND_VENDOR #expands to all -D defined symbols
- -I"$": COLLECTION_PATHS_SOURCE_INCLUDE_VENDOR
- '-DTEST'
- '-DUNITY_EXCLUDE_STDINT_H'
- '-DUNITY_EXCLUDE_LIMITS_H'
- '-DUNITY_EXCLUDE_SIZEOF'
- '-DUNITY_INCLUDE_DOUBLE'
- '-DUNITY_SUPPORT_TEST_CASES'
- '-DUNITY_INT_WIDTH=32'
- '-DUNITY_LONG_WIDTH=32'
- '-DUNITY_INCLUDE_CONFIG_H'
:test_linker:
:executable: arm-none-eabi-gcc
:arguments:
- '-lm'
- '-mcpu=cortex-m0'
- '-mthumb'
- '-specs=nosys.specs'
#- '-T targets/gcc_armcortexM3/qemu.ld'
:test_simulator:
:executable: qemu-system-arm
:arguments:
- -cpu cortex-m3
- -M lm3s6965evb
- -no-reboot
- -nographic
- -kernel
:plugins:
:load_paths:
- vendor/ceedling/plugins
:enabled:
- stdout_pretty_tests_report
- module_generator
But still i have problems with compilation. For example:
Test 'test_command.c'
---------------------
Generating runner for test_command.c...
Compiling test_command_runner.c...
In file included from /home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/vendor/unity/src/unity.h:16:0,
from build/test/runners/test_command_runner.c:22:
/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/vendor/unity/src/unity_internals.h:11:26: fatal error: unity_config.h: No such file or directory
#include "unity_config.h"
^
compilation terminated.
ERROR: Shell command failed.
> Shell executed command:
'arm-none-eabi-gcc build/test/runners/test_command_runner.c -c -g -mcpu=cortex-m0 -mthumb -Wall -Wno-address -I"test" -I"test/support" -I"../CDynTransport/src" -I"/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/vendor/unity/src" -I"/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/vendor/cmock/src" -I"build/test/mocks" -DTEST -I"../CDynTransport/src" -DTEST -DUNITY_EXCLUDE_STDINT_H -DUNITY_EXCLUDE_LIMITS_H -DUNITY_EXCLUDE_SIZEOF -DUNITY_INCLUDE_DOUBLE -DUNITY_SUPPORT_TEST_CASES -DUNITY_INT_WIDTH=32 -DUNITY_LONG_WIDTH=32 -DUNITY_INCLUDE_CONFIG_H'
> And exited with status: [1].
rake aborted!
ShellExecutionException: ShellExecutionException
/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/lib/ceedling/tool_executor.rb:78:in `exec'
/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/lib/ceedling/generator.rb:95:in `generate_object_file'
/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/lib/ceedling/rules_tests.rake:17:in `block in <top (required)>'
/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/lib/ceedling/task_invoker.rb:74:in `invoke_test_results'
/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/lib/ceedling/test_invoker.rb:68:in `block in setup_and_invoke'
/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/lib/ceedling/test_invoker.rb:32:in `setup_and_invoke'
/home/slawek/CentralInterface/CDynTransportTest/vendor/ceedling/lib/ceedling/tasks_tests.rake:11:in `block (2 levels) in <top (required)>'
Tasks: TOP => build/test/results/test_command.pass => build/test/out/test_command.out => build/test/out/test_command_runner.o
(See full trace by running task with --trace)
Do someone has ready-to-go configuration for Ceedling for STM32 microcontroller?
I'm not sure how I've ended up here, but anytime I run guard init, it seems to go a bit overboard, and rather than adding coffeescript/sass/livereload once, it does each of them several times.
Here is what I get on the command line after running guard init:
WARN: Unresolved specs during Gem::Specification.reset:
thor (>= 0.14.6)
lumberjack (>= 1.0.2)
ffi (>= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
11:39:55 - INFO - Writing new Guardfile to /var/www/the-newbies-guide-to-test-driven-development/Guardfile
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:57 - INFO - compass guard added to Guardfile, feel free to edit it
11:39:57 - INFO - concat guard added to Guardfile, feel free to edit it
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - There are 2 definitions in your Guardfile for 'livereload', you may want to clean up your Guardfile as this could cause issues.
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - There are 3 definitions in your Guardfile for 'livereload', you may want to clean up your Guardfile as this could cause issues.
11:39:58 - INFO - phpunit guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - uglify guard added to Guardfile, feel free to edit it
With this being the contents of my Guardfile:
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'compass' do
watch('^src/(.*)\.s[ac]ss')
end
# This will concatenate the javascript files specified in :files to public/js/all.js
guard :concat, type: "js", files: %w(), input_dir: "public/js", output: "public/js/all"
guard :concat, type: "css", files: %w(), input_dir: "public/css", output: "public/css/all"
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'phpunit', :cli => '--colors' do
watch(%r{^.+Test\.php$})
end
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'uglify', :destination_file => "public/javascripts/application.js" do
watch (%r{app/assets/javascripts/application.js})
end
Obviously I can just go in and remove the duplicated lines, but I was wondering why it happened in the first place.
It looks like guard will use all available versions of a plugin when running the init - not sure if it does this when actually running too (which would be worrying). I was having the same trouble and checked my gem list:
gem list | grep guard
This showed me how many versions of guard related plugins I had installed:
guard (1.8.2, 1.8.0, 1.7.0, 1.6.2, 1.6.1, 1.5.4, 1.0.3, 1.0.1)
guard-concat (0.0.3)
guard-rspec (3.0.0, 2.5.3, 2.4.1, 2.3.3, 2.1.2, 1.2.1, 0.7.2, 0.7.0)
guard-sass (1.3.2)
guard-spork (0.8.0)
guard-uglify (0.1.0)
terminal-notifier-guard (1.5.3)
Running gem cleanup on the guard plugin that gets repeated sorted it all out:
gem cleanup guard-rspec
gem list | grep guard
Which then showed:
guard (1.8.2, 1.8.0, 1.7.0, 1.6.2, 1.6.1, 1.5.4, 1.0.3, 1.0.1)
guard-concat (0.0.3)
guard-rspec (3.0.0)
guard-sass (1.3.2)
guard-spork (0.8.0)
guard-uglify (0.1.0)
terminal-notifier-guard (1.5.3)
When I run guard init now I do not have repeated code in my Guardfile.