Tag: ruby在轨道

Ruby&Redis / Skidekiq URI :: InvalidURIError:redisscheme不接受registry部分:bsc_redis:6379(或者是错误的主机名?)

在我的docker服务器上我在sidekiq / redis URL URL错误: Sidekiq.configure_client do |config| config.redis = { url: "redis://bsc_redis:6379", size: 1 } end 我明白了 URI :: InvalidURIError:schemeredis不接受registry部分:bsc_redis:6379(或坏主机名?)从/usr/local/lib/ruby/2.0.0/uri/generic.rb:214:in initialize' from /usr/local/lib/ruby/2.0.0/uri/common.rb:218:in从/usr/local/lib/ruby/2.0.0/uri/common.rb:218:in initialize' from /usr/local/lib/ruby/2.0.0/uri/common.rb:218:in parse' from /usr/local/lib/ruby/2.0.0/uri/common.rb:747:in parse” log_info' from /usr/local/bundle/gems/sidekiq-4.2.9/lib/sidekiq/redis_connection.rb:20:in创build' log_info' from /usr/local/bundle/gems/sidekiq-4.2.9/lib/sidekiq/redis_connection.rb:20:in .rb:131:在redis=' from (irb):4:in block in irb_binding'from /usr/local/bundle/gems/sidekiq-4.2.9/lib/sidekiq.rb:83:in configure_client' from (irb):4 from /usr/local/bundle/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in start from /usr/local/bundle/gems/railties-3.2.13 /lib/rails/commands/console.rb:8:in start' from […]

Rails ckeditor只在本地上传图片,而不是在docker上

我正在使用rails 5.0.1与gem'ckeditor',github:'galetahub / ckeditor'。 当我上传一个图片时,在本地运行: Started POST "/ckeditor/pictures?CKEditor=blog_content&CKEditorFuncNum=1&langCode=en" for 127.0.0.1 at 2017-08-25 13:42:46 +0200 Processing by Ckeditor::PicturesController#create as HTML Parameters: {"upload"=>#<ActionDispatch::Http::UploadedFile:0x007fdbb2751418 @tempfile=#<Tempfile:/var/folders/ct/h7f4s97j5g5_8kt74w7z9j7w0000gn/T/RackMultipart20170825-15213-h6z3o4.jpg>, @original_filename="Celina.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"upload\"; filename=\"Celina.jpg\"\r\nContent-Type: image/jpeg\r\n">, "ckCsrfToken"=>"KWW95qRoTkkliU37ytqWhxGEg0Qmlo2BlMa3jhY0", "CKEditor"=>"blog_content", "CKEditorFuncNum"=>"1", "langCode"=>"en"} Command :: PATH=/usr/bin/:$PATH; identify -format '%wx%h,%[exif:orientation]' '/var/folders/ct/h7f4s97j5g5_8kt74w7z9j7w0000gn/T/9a373c13873aa5b41008cdf6948f3c9a20170825-15213-10eo1d0.jpg[0]' 2>/dev/null Command :: PATH=/usr/bin/:$PATH; identify -format %m '/var/folders/ct/h7f4s97j5g5_8kt74w7z9j7w0000gn/T/9a373c13873aa5b41008cdf6948f3c9a20170825-15213-10eo1d0.jpg[0]' Command :: PATH=/usr/bin/:$PATH; convert '/var/folders/ct/h7f4s97j5g5_8kt74w7z9j7w0000gn/T/9a373c13873aa5b41008cdf6948f3c9a20170825-15213-10eo1d0.jpg[0]' -auto-orient -resize […]

Docker工具箱:由于Host目录没有安装到Home目录,找不到Gemfile

我有我的本地机器上安装Docker工具箱,我试图运行Ruby命令来执行数据库迁移。 我在Docker Toolbox快速入门terminal命令行中使用以下docker命令: docker-compose run app /usr/local/bin/bundle exec rake db:migrate docker-compose run app bundle exec rake db:create RAILS_ENV=production docker-compose run app /usr/local/bin/bundle exec rake db:seed 但是,这些命令被调用后,我得到以下错误: Could not locate Gemfile or .bundle/ directory 在Docker Toolbox中,当我运行这些命令(C:\ project)时,我位于项目的目录中。 在做了一些研究之后,看起来我需要将我的主目录安装在我的主目录中。 所以我尝试使用下面的Docker Mount命令: docker run –mount /var/www/docker_example/config/containers/app.sh:/usr/local/bin docker run –mount /var/www/docker_example/config/containers/app.sh:/c/project 这两个命令都给我以下错误: invalid argument "/var/www/docker_example/config/containers/app.sh:/usr/local/bin" for –mount: invalid field […]

使用Docker for Development,我错过了这个观点吗?

如果您需要安装Python,Go,Ruby及其依赖项,以便在IDE(例如VS Code或Jetbrains等效项)中正常工作,那么使用Docker进行开发有什么意义? 没有它们,你就不会有一些开发工具,比如适当的debugging器。 看起来你需要做所有额外的步骤来设置开发有或没有docker。 那么为什么要使用它? 我理解部署,但不是为了开发。

Solr在与太阳黑色轨道的一个分开的docker的容器

我正试图将一个工作的Rails应用程序移动到docker环境。 遵循UNIX(/ docker)理念,我希望每个服务都在自己的容器中。 我设法得到redis和postgres工作正常,但我正在努力让slor和rails互相交谈。 在执行该行时在文件app/models/spree/sunspot/search_decorator.rb @solr_search.execute 控制台上显示以下错误: Errno::EADDRNOTAVAIL (Cannot assign requested address – connect(2) for "localhost" port 8983): 在研究解决scheme时,我发现人们只是将solr安装在与rails应用程序相同的容器中。 但我宁愿把它放在一个单独的容器里。 这里是我的config/sunspot.yml development: solr: hostname: localhost port: 8983 log_level: INFO path: /solr/development 和docker-compose.yml文件 version: '2' services: db: (…) redis: (…) solr: image: solr:7.0.1 ports: – "8983:8983" volumes: – solr-data:/opt/solr/server/solr/mycores entrypoint: – docker-entrypoint.sh – solr-precreate – mycore […]

我如何可以在不同的容器泊坞窗中分离Rails API和Rails工作

我正在计划dockerize我现有的Rails项目。 我的项目有一个API控制器和工作人员在后台运行作业 有没有办法使用Docker容器将我的应用程序分成三部分: 例如: 一个容器的应用程序 运行Rails作业的一个容器 一个容器为Rails API 我知道,我可以使用一个容器的应用程序和另一个数据库,但我的问题是隔离应用程序。

Docker无法在Rails bundle上安装rake

我使用Docker for Windows来运行Rails(v5)应用程序的Image。 当我做docker构build我得到这个错误。 我不知道在哪里寻找debugging和/或解决这个问题。 这里是我的DockerFile:从ruby:2.3.3-slim RUN apt-get update && apt-get install -y build-essential RUN apt-get install -y libmysqlclient-dev RUN apt-get install -y mysql-client RUN apt-get install -y libmagickwand-dev imagemagick RUN apt-get install -y curl RUN curl -sL https://deb.nodesource.com/setup_6.x | bash – RUN apt-get install -y nodejs RUN apt-get install -y git #RUN npm install […]

保存当前正在运行的redmine docker更改为重用

我是新来的docker,已经运行一个生产redminedocker,我已经做了改变(主要是js,css和html来定制它)。 我现在看起来相当开心,但由于缺乏知识,我错过了一些我现在要添加的东西,例如邮件服务器,并将我的整个应用程序指向一个子域而不是主要是目前。 这是我的问题: 我首先运行的图像: docker run -p 80:80 –name=redmine –rm –link=mysql-redmine:mysql / –volume=/srv/docker/redmine/redmine:/home/redmine/data sameersbn/redmine:3.4.2 从那以后,我所做的所有事情都是docker restart以查看HTML更改,但是我对重新运行没有信心,因为它不会保存这些更改,对吗? 每次我运行它时都需要envvariables,还是有一种方法可以将它们保存在我的映像中,以便始终在相同的端口和MySQL DB上运行映像? 我看了一下正在运行的docker文件,并且database.yml在第一次运行期间传递了正确的configuration,但是我不确定是否保存了下一次运行。 最后一个:我知道我可以将这个图像转换成一个自定义的图像来保存一些变化,但是我不知道哪个是哪个,哪些没有保存。 ¿运行时的envs是否保存在提交? 希望你能帮忙,文档不是很清楚,也不是很广泛,解决方法通常是基于非常具体的案例,并不能真正回答我所有的问题。 另外,我也知道Docker文件,但是也怀疑它和run命令。 多谢你们!

使用Dockerfile构buildDocker镜像时出错

我正在尝试在Dockerfile使用configuration来构buildDockerfile : FROM ubuntu MAINTAINER axiom88guru(axiom88guru@gmail.com) Configuration for app below. Run upgrades RUN apt-get update Install basic packages RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs Install Ruby RUN apt-get -qq -y install ruby-full RUN gem install bundler –no-ri –no-rdoc RUN gem install foreman Install rails-new-docker WORKDIR /app RUN git clone https://github.com/axiom88-guru/rails-docker.git […]

Docker和Rails环境

从整个Docker的事情开始,我无法将自己的头围绕在一件事情上: 如何处理不同的依赖关系? 比方说,在制作中,我不想安装git,grunt等,但是在开发中我是这么做的。 可以运行testing的容器和在生产中运行的容器是有区别的。 我在想这个错吗?