gems

redmine安装webhook

ε祈祈猫儿з 提交于 2020-03-02 18:11:39
docker容器中: gem source --add https://ruby.taobao.org/ --remove https://rubygems.org/ bundle install 要求安装11.2.2的rake gem install rake -v 11.2.2 cd plugins/redmine_webhook rake redmine:plugins:migrate RAILS_ENV=production 报错: rake aborted! Gem::LoadError: You have already activated rake 11.2.2, but your Gemfile requires rake 11.3.0. Prepending `bundle exec` to your command may solve this. /var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:35:in `block in setup' /var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:20:in `map' /var/lib/gems/2.1.0/gems/bundler-1.12.5/lib

use mixin and autoload_paths vs eager_load_paths

孤人 提交于 2019-12-23 05:19:17
Greg Yang Developer Taipei, Taiwan 108 POSTS 35 TAGS 若要查看是否有载入请在 rails c 输入这行 ActiveSupport::Dependencies.autoload_paths OR Rails.application.config.assets.paths 即可 > rails c > ActiveSupport::Dependencies.autoload_paths [ [ 0] "/Users/app/assets", [ 1] "/Users/app/channels", [ 2] "/Users/app/controllers", [ 3] "/Users/app/controllers/concerns", [ 4] "/Users/app/helpers", [ 5] "/Users/app/jobs", [ 6] "/Users/app/mailers", [ 7] "/Users/app/models", [ 8] "/Users/app/models/concerns", [ 9] "/Users/app/uploaders", 我们需要的是载入这行 -> [10] "/Users/lib/modules", [11] "/Users/.rvm/gems/ruby-2.3.1/gems

How to resolve deserialization error in delayed job?

岁酱吖の 提交于 2019-12-20 16:15:29
问题 I am trying to use DelayedJob and the job is failing, giving the following error in the database: {Delayed::DeserializationError /Library/Ruby/Gems/1.8/gems/delayed_job-2.1.3/lib/delayed/serialization/active_record.rb:7:in `yaml_new' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `transfer' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `node_import' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib

gitlab迁移实践

[亡魂溺海] 提交于 2019-12-11 22:54:49
因办公室环境网络调整,近期计划将gitlab从内网机房迁移至公有云。迁移过程做了一下简单的记录,希望对各位同行有所帮助。 旧服务器A centos6.9 10.1.2.10 gitlab-ce-8.16.0-ce.0.el6.x86_64 新服务器B centos6.9 192.168.100.10 gitlab-ce-8.16.0-ce.0.el6.x86_64 一、迁移基本思路 1、采购公有云服务器,自带公网IP、加入onlyyou安全组。 2、安全组开放80端口(所有办公网出口、v隧p道n(公))、9000端口(所有办公网出口、v隧p道n(公)、以及Jks、其他测试服公网IP)。 3、搭建同版本Git服务。 4、发布公告,暂停git服务 5、将完整备份导入新Git。 6、利用iptables映射9000端口至3303(iptables -t nat -A PREROUTING -p tcp --dport 9000 -j REDIRECT --to-ports 3303)。(注:9000为之前frp的远程端口,3303为服务器B的ssh端口) 7、DNS解析(git.bd.com):删除办公网DNS的解析记录,修改公网DNS解析记录至服务器B公网IP。 二、操作步骤 2.1、备份 1.备份服务器A中的git数据,具体备份操作命令 [root@serverA ~]#

Puppet apache + passenger模式扩展

走远了吗. 提交于 2019-12-06 19:11:43
puppet使用SSL(https)协议来进行通讯,默认情况下,puppet server端使用基于Ruby的WEBRick HTTP服务器。由于WEBRick HTTP服务器在处理agent端的性能方面并不是很强劲,因此需要扩展puppet,搭建Apache或者其他web服务器来处理客户的https请求。 Passenger是一个将Ruby程序嵌入执行的apache的一个模块,它可以让你运行Rails,即Rack应用内的一个Web服务器.能够自动增减集群进程的数量.能提高性能并增加Master和agent之间的并发连接数量。 工作原理如下: 安装好apache和passenger,然后配置apache处理puppet agent的SSL验证请求,最后将apache连接到puppet master.在处理SSL验证请求时,apache会验证puppet agent的证书是否由puppet CA签发,apache 会先验证请求.如果授权通过,则调用master.同时,apache会提供给puppet agent一个证书用于验证服务器的真实性,再将SSL证书存放在适当的位置.打开passenger模块并为puppet master服务创建一个虚拟主机来配置apache. 下面来配置一番: 1.安装apache等相关组件 yum install httpd httpd-devel mod

use mixin and autoload_paths vs eager_load_paths

我只是一个虾纸丫 提交于 2019-12-06 15:18:37
Greg Yang Developer Taipei, Taiwan 108 POSTS 35 TAGS 若要查看是否有载入请在 rails c 输入这行 ActiveSupport::Dependencies.autoload_paths OR Rails.application.config.assets.paths 即可 > rails c > ActiveSupport::Dependencies.autoload_paths [ [ 0] "/Users/app/assets", [ 1] "/Users/app/channels", [ 2] "/Users/app/controllers", [ 3] "/Users/app/controllers/concerns", [ 4] "/Users/app/helpers", [ 5] "/Users/app/jobs", [ 6] "/Users/app/mailers", [ 7] "/Users/app/models", [ 8] "/Users/app/models/concerns", [ 9] "/Users/app/uploaders", 我们需要的是载入这行 -> [10] "/Users/lib/modules", [11] "/Users/.rvm/gems/ruby-2.3.1/gems

Another: uninitialized constant Rake::DSL

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Here' the output: rake aborted ! uninitialized constant Rake :: DSL / Users / marclipovsky / Sites / sat - 7 / app / Rakefile : 6 / System / Library / Frameworks / Ruby . framework / Versions / 1.8 / usr / lib / ruby / 1.8 / rake . rb : 2383 : in `load' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2383:in ` raw_load_rakefile ' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile' / System / Library / Frameworks / Ruby . framework / Versions / 1.8 /

RVM + Nginx + Passenger in Chef

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to setup Nginx with Passenger on RVM in Chef using community cookbook for nginx and fnichol's for RVM. Everything on ubuntu. Now, my problem is that if I bootstrap the machine using knife ec2 and try to install everything in one go, it fails. For the most part it works well, picking up RVM and Passenger nicely, until the point when it realizes Passenger is not compiled, tries to do it using rake from default ruby 1.9.1 and fails. If I then connect to the machine and run sudo chef-client , everything finishes beautifully and I have

Wrong number of arguments (0 for 1) in default scope

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I keep getting the error ArgumentError: wrong number of arguments (0 for 1) for my default_scope which is default_scope { where("#{table_name}.tenant_id IS NULL") } It keeps giving me this error and I don't understand why. I have the default scope in my users model. Update: Error output if using rails console: ArgumentError: wrong number of arguments (0 for 1) from /home/evan/Apps/demo-application/app/models/user.rb:18:in `hash' from /home/evan/.rvm/gems/ruby-2.0.0-p195/gems/activerecord-4.0.4/lib/active_record/scoping.rb:64:in `value_for'

How to downgrade application from Ruby 2.0.0 to 1.9.3

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My application is using Ruby 2.0.0-p247 but I need to downgrade to 1.9.3 (a custom module that's critical to my application doesn't work in 2.0.0 but does in 1.9.3). To do this I updated my gemfile with ruby '1.9.3' in the command line i typed: rvm use 1.9.3 I also edited the .ruby-version file and replaced it's contents with: 1.9.3 I ran bundle install and then tried to start the application by typing: rails s It tries to start up but then gives a segmentation fault (long time since i saw one of those). The error outputted is pasted below.