1.5.0 버전이 작동하지 않음

11886 단어 letter_opener

묘사

헤이, 내가 무슨 문제가 생겼는지 모르겠지만, 다른 프로젝트에서 나는gem의 낮은 버전에 문제가 없다.
e-메일은 브라우저에 표시되지 않고 오류 메시지가 로그에 표시됩니다.

Error showing URL: Operation not supported


저는 Rails 5.1.4와 Ruby 2.5.0을 사용했습니다.
코드를 보고 있습니다. 질문은 코드lib/letter_opener/delivery_method.rb에 있는 것 같습니다. 다음 줄에 있습니다.Launchy.open("file:///#{URI.parse(CGI.escape(messages.first.filepath))}")만약 내가 URI.escape 또는 CGI.parse를 사용한다면, 그것은 문제를 해결할 수 있지만, 나는 그것이 다른 문제를 의미하는지 모르겠다.
감사합니다!

토론 #1

@alpemaca, 당신은 어떤 운영체제를 사용합니까?

토론 #2

@alpemaca도 프로젝트의 전체 경로를 보여줄 수 있습니까?

토론 #셋

@nashby
나는 ubuntu 14.04를 기반으로 하는 linux mint 17.2를 사용한다.
경로: /home/alberto/dev/newproject/

토론 #4

@alpemaca 알겠습니다.당신은 LAUNCHY_DEBUG=true로 당신의 Rails 서버를 실행할 수 있습니까? 그러면 우리는 Launchy의 로그를 검사할 수 있습니까?

토론 #5

여기 있습니다. 감사합니다.LAUNCHY_DEBUG: URI parsing pass 1 : file:///%2Fhome%2Falberto%2Fdev%2Fnewproject%2Ftmp%2Fletter_opener%2F1514928144_2240384_c494910%2Frich.html -> {:scheme=>"file", :user=>nil, :password=>nil, :host=>"", :port=>nil, :path=>"/%2Fhome%2Falberto%2Fdev%2Fnewproject%2Ftmp%2Fletter_opener%2F1514928144_2240384_c494910%2Frich.html", :query=>nil, :fragment=>nil} LAUNCHY_DEBUG: Checking if class Launchy::Application::Browser is the one for handles?(file:///%2Fhome%2Falberto%2Fdev%2Fnewproject%2Ftmp%2Fletter_opener%2F1514928144_2240384_c494910%2Frich.html)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Windows is the one for matches?(linux-gnu)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Windows is the one for matches?(linux-gnu)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)} LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Kde is the one for is_current_desktop_environment?()} LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Gnome is the one for is_current_desktop_environment?()} LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/gnome-open LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/gnome-open LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/firefox LAUNCHY_DEBUG: Launchy::Application : Unable to find 'iceweasel' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application : Unable to find 'seamonkey' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/opera LAUNCHY_DEBUG: Launchy::Application : Unable to find 'mozilla' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application : Unable to find 'netscape' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application : Unable to find 'galeon' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application::Browser : possibility from app_list : gnome-open LAUNCHY_DEBUG: Launchy::Application::Browser : possibility from app_list : firefox LAUNCHY_DEBUG: Launchy::Application::Browser : possibility from app_list : opera LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Kde is the one for is_current_desktop_environment?()} LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Gnome is the one for is_current_desktop_environment?()} LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/gnome-open LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/gnome-open LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/firefox LAUNCHY_DEBUG: Launchy::Application : Unable to find 'iceweasel' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application : Unable to find 'seamonkey' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/opera LAUNCHY_DEBUG: Launchy::Application : Unable to find 'mozilla' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application : Unable to find 'netscape' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application : Unable to find 'galeon' in /home/alberto/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bin, /home/alberto/.rbenv/versions/2.5.0/bin, /home/alberto/.rbenv/libexec, /home/alberto/.rbenv/plugins/ruby-build/bin, /home/alberto/.pyenv/plugins/pyenv-virtualenv/shims, /home/alberto/.pyenv/shims, ~/.pyenv/bin, /home/alberto/.nvm/versions/node/v6.10.3/bin, /usr/local/heroku/bin, /home/alberto/.rbenv/shims, /opt/android-sdk/build-tools/, /usr/share/elasticsearch/bin, /home/alberto/.rbenv/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /opt/android-sdk/tools, /opt/android-sdk/platform-tools, /opt/node/bin, /opt/gradle/bin LAUNCHY_DEBUG: Launchy::Application::Browser : Using browser value 'gnome-open' LAUNCHY_DEBUG: wet_run: before exec in child process LAUNCHY_DEBUG: commandline_normalized => gnome-open file:///%2Fhome%2Falberto%2Fdev%2Fnewproject%2Ftmp%2Fletter_opener%2F1514928144_2240384_c494910%2Frich.html

토론 #6

@alpemaca 감사합니다!보시다시피 Launchy gem은 Addressable로 우리가 전달한 URL을 분석했기 때문에 우리는 정말 더 이상 피할 필요가 없다고 생각합니다.너는 그 줄을 Launchy.open("file:///#{messages.first.filepath}")로 바꾸어 볼 수 있니?

토론 #7

@nashby
네, 유효합니다.

토론 #8

@alpemaca 감사합니다.나는 브랜치 도련님께 도움을 청했다.마음대로 사용하세요.

토론 #9

@nashby는 당신의 일에 매우 감사합니다:)

토론 #10

같은 문제에 직면하여 가능한 한 빨리

토론 #11

새 버전을 발표해 주십시오.

좋은 웹페이지 즐겨찾기