Skip to content

Commit

Permalink
Update solidus buildpack to work with rails 5.2
Browse files Browse the repository at this point in the history
Latest rails buildpack is going to try to understand if yarn is installed
by reading the Gemfile.lock file of the application.

Gemfile.lock is supposed to be there for all apps but we don't have one
at that stage since it's not commited and bundle install is still not
executed.

I fixed removing the yarn check, since for now we don't have it.
  • Loading branch information
kennyadsl committed Aug 16, 2018
1 parent 5ad21b8 commit 518ca59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/language_pack/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def setup_export
def setup_profiled
instrument 'setup_profiled' do
profiled_path = [binstubs_relative_paths.map {|path| "$HOME/#{path}" }.join(":")]
profiled_path << "vendor/#{@yarn_installer.binary_path}" if has_yarn_binary?
# profiled_path << "vendor/#{@yarn_installer.binary_path}" if has_yarn_binary?
profiled_path << "$PATH"

set_env_default "LANG", "en_US.UTF-8"
Expand Down
4 changes: 2 additions & 2 deletions lib/language_pack/solidus.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "language_pack"
require "language_pack/rails42"
require "language_pack/rails5"

class LanguagePack::Solidus < LanguagePack::Rails5
# detects if this is a Rails 5 app
Expand All @@ -21,7 +21,7 @@ def compile
# a new rails app in the current directory

# We try to save a second by using the system libxml
sh "NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install --user-install --no-ri --no-rdoc railties:'~>5.1.0'"
sh "NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install --user-install --no-ri --no-rdoc railties:'~>5.2'"

# We need an absolute path since the gem bin dir isn't in our path
rails_path = `ruby -e "gem 'railties'; puts Gem.bin_path('railties', 'rails')"`.strip
Expand Down

0 comments on commit 518ca59

Please sign in to comment.