Closed mark-dce closed 7 years ago
It turns out rubocop doesn't like the second option - to swallow the load error - so I ended up with the conditional block around both tasks.
I think we agreed to do unless Rails.env.production?
Fixed in #185
So was this ever fixed? I'm getting this error now...
What are we supposed to do? Is there no workaround..>?
Scott - Yes, this was fixed by #185 and closed when that PR was merged. It's possible that additional dependencies have been added since then that cause a similar error.
Can you post the exact error you're getting - i.e. the portion that looks like LoadError: cannot load such file -- solr_wrapper/rake_task
That last bit, e.g. solr_wrapper/rake_task, should tell you exactly which rake task is being requested. Once you have the file name, take a look at #185 and see if the same strategy could work.
Ok, thanks...I did it like this...
I think it's because I ran........ bundle install --deployment --without development test (following the instruction from Passenger on Deploying a Ruby app with Debian 8...)
Then I got things to run by doing this...below
Also, for some reason after deployment, my original admin user on my development server couldn't see the Collection or Work Types in Hyrax... I think I will have to delete user and recreate.....(I think I've lost years on my life over this..!)
Thanks again,
ruby - LoadError: cannot load such file -- rspec/core/rake_task - Stack Overflow 1down vote In Production Environment
What happens is, capistrano is configured to only install gem bundle in production group(as in Gemfile). So it runs bundle command like bundle install --without development test. Want to verify?
Run bundle install command in project dir in Production environment, you will see following
Using devise 4.2.0Using activeadmin 1.0.0.pre4Using responsive_active_admin 0.0.5Bundle complete! 60 Gemfile dependencies, 133 gems now installed.Gems in the groups development and test were not installed.Bundled gems are installed into /path/to/your/app/production/shared/bundle.
Please note (Gems in the groups development and test were not installed.).
Solution
try to specify the RAILS_ENV like
RAILS_ENV=production bundle exec rails -T
RAILS_ENV=production bundle exec rake -T
bundle exec rake -T RAILS_ENV=production
On Thu, Jul 26, 2018 at 4:16 PM, Mark Bussey notifications@github.com wrote:
Scott - Yes, this was fixed by #185 https://github.com/curationexperts/epigaea/pull/185 and closed when that PR was merged. It's possible that additional dependencies have been added since then that cause a similar error.
Can you post the exact error you're getting - i.e. the portion that looks like LoadError: cannot load such file -- solr_wrapper/rake_task
That last bit, e.g. solr_wrapper/rake_task, should tell you exactly which rake task is being requested. Once you have the file name, take a look at #185 https://github.com/curationexperts/epigaea/pull/185 and see if the same strategy could work.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/curationexperts/epigaea/issues/147#issuecomment-408221757, or mute the thread https://github.com/notifications/unsubscribe-auth/AaHCswbxRAQt20g2gS2jPtrXcolfgnKwks5uKiOWgaJpZM4Ou9pk .
-- Scott Kushner Systems and Emerging Technologies Librarian
Saint Peter's University The Jesuit University of New Jersey
Theresa & Edward O'Toole Library 99 Glenwood Ave. Jersey City, New Jersey 07306
p: (201) 761-6456 f: (201) 761-6451
www.saintpeters.edu/library
It sounds like you're dealing with a more general Hyrax application than the MIRA application (or epigaea - which is the Tufts University project this repo is for). You might want to e-mail the samvera-tech@googlegroups.com or chat with folks on the Samvera community slack channel. You can get info about how to get in touch here https://wiki.duraspace.org/pages/viewpage.action?pageId=87460391
Thanks.
On Thu, Jul 26, 2018 at 5:41 PM, Mark Bussey notifications@github.com wrote:
It sounds like you're dealing with a more general Hyrax application than the MIRA application (or epigaea - which is the Tufts University project this repo is for). You might want to e-mail the samvera-tech@googlegroups.com or chat with folks on the Samvera community slack channel. You can get info about how to get in touch here https://wiki.duraspace.org/pages/viewpage.action?pageId=87460391
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/curationexperts/epigaea/issues/147#issuecomment-408243855, or mute the thread https://github.com/notifications/unsubscribe-auth/AaHCs-cSHPojnPv7bsSq6GNqtBWKltCPks5uKjdxgaJpZM4Ou9pk .
-- Scott Kushner Systems and Emerging Technologies Librarian
Saint Peter's University The Jesuit University of New Jersey
Theresa & Edward O'Toole Library 99 Glenwood Ave. Jersey City, New Jersey 07306
p: (201) 761-6456 f: (201) 761-6451
www.saintpeters.edu/library
ISSUE When I got around to trying to deploy the application in a production like environment, I ran into dependency errors from rake tasks that only make sense in the development environment.
In both cases rake tasks are loading code that depends on gems that are only loaded in the development environment.
My initial (ugly) solutions are: https://github.com/curationexperts/epigaea/blob/09f2c6c71cbbacc74b6b637b0a51b7d7178759f1/lib/tasks/rubocop.rake or https://github.com/curationexperts/epigaea/blob/09f2c6c71cbbacc74b6b637b0a51b7d7178759f1/lib/tasks/spec.rake
ACCEPTANCE