Cannot install 2.5.0 on Windows 7 x64 #703

Closed
maratgaliev opened this Issue Jan 15, 2012 · 33 comments

Comments

Projects
None yet
@maratgaliev

All environment was set up from railsinstaller.
Ruby - 1.9.2-p290
Rails - 3.1.1 etc

Error:
G:\Projects\burk>gem install paperclip -v '2.5.0'
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument - C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/paperclip-2.5.0/test/fixtures/question?mark.png

Version 2.4.5 installed fine, but got error on migrate:

G:\Projects\burk>gem install paperclip -v '2.5.0' --trace
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --trace

G:\Projects\burk>rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:migrate
== CreateBrands: migrating ===================================================
-- create_table(:brands)
rake aborted!
An error has occurred, all later migrations canceled:

undefined method has_attached_file' for #<ActiveRecord::ConnectionAdapters::Tab leDefinition:0x5c804a0> G:/Projects/burk/db/migrate/20120115082718_create_brands.rb:6:inblock in ch
ange'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/connection_adapters/abstract/schema_statements.rb:161:in create_table ' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti ve_record/connection_adapters/mysql2_adapter.rb:481:increate_table'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:447:in block in method_missing' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti ve_record/migration.rb:422:inblock in say_with_time'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/benchmark.rb:295:in measure' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti ve_record/migration.rb:422:insay_with_time'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:442:in method_missing' G:/Projects/burk/db/migrate/20120115082718_create_brands.rb:3:inchange'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:391:in block (2 levels) in migrate' C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/benchmark.rb:295:inmeasure'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:391:in block in migrate' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti ve_record/connection_adapters/abstract/connection_pool.rb:185:inwith_connectio
n'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:375:in migrate' C:inmigrate'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:687:in block (2 levels) in migrate' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti ve_record/migration.rb:744:incall'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:744:in ddl_transaction' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti ve_record/migration.rb:686:inblock in migrate'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:671:in each' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti ve_record/migration.rb:671:inmigrate'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/migration.rb:549:in up' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti ve_record/migration.rb:530:inmigrate'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.3/lib/acti
ve_record/railties/databases.rake:161:in block (2 levels) in <top (required)>' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task. rb:205:incall'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.
rb:205:in block in execute' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task. rb:200:ineach'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.
rb:200:in execute' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task. rb:158:inblock in invoke_with_call_chain'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in mon_synchronize' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task. rb:151:ininvoke_with_call_chain'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.
rb:144:in invoke' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli cation.rb:116:ininvoke_task'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:94:in block (2 levels) in top_level' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli cation.rb:94:ineach'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:94:in block in top_level' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli cation.rb:133:instandard_exception_handling'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:88:in top_level' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli cation.rb:66:inblock in run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:133:in standard_exception_handling' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli cation.rb:63:inrun'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in
<top (required)>' C:/RailsInstaller/Ruby1.9.2/bin/rake:19:inload'
C:/RailsInstaller/Ruby1.9.2/bin/rake:19:in `

'
Tasks: TOP => db:migrate

@jyurek

This comment has been minimized.

Show comment
Hide comment
@jyurek

jyurek Jan 16, 2012

Contributor

That's odd. Can you post the code in 20120115082718_create_brands.rb so I can see what line 6 is trying to do?

Contributor

jyurek commented Jan 16, 2012

That's odd. Can you post the code in 20120115082718_create_brands.rb so I can see what line 6 is trying to do?

@pmarsceill

This comment has been minimized.

Show comment
Hide comment
@pmarsceill

pmarsceill Jan 16, 2012

I believe this is related to this issue #621

I believe this is related to this issue #621

@pmarsceill

This comment has been minimized.

Show comment
Hide comment
@pmarsceill

pmarsceill Jan 16, 2012

because of this error:
Invalid argument - C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/paperclip-2.5.0/test/fixtures/question?mark.png

because of this error:
Invalid argument - C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/paperclip-2.5.0/test/fixtures/question?mark.png

@maratgaliev

This comment has been minimized.

Show comment
Hide comment
@maratgaliev

maratgaliev Jan 16, 2012

class CreateBrands < ActiveRecord::Migration
def change
create_table :brands do |t|
t.string :name
t.text :description
t.has_attached_file :logo
end
end
end

class CreateBrands < ActiveRecord::Migration
def change
create_table :brands do |t|
t.string :name
t.text :description
t.has_attached_file :logo
end
end
end

@jyurek

This comment has been minimized.

Show comment
Hide comment
@jyurek

jyurek Jan 17, 2012

Contributor

If this is related to #612, what should we do? Should we change that character on Windows?

Contributor

jyurek commented Jan 17, 2012

If this is related to #612, what should we do? Should we change that character on Windows?

@maratgaliev

This comment has been minimized.

Show comment
Hide comment
@maratgaliev

maratgaliev Jan 17, 2012

I think so, yes. Why filename contains strange characters? You know, windows is very demanding system:)
Thanks.

I think so, yes. Why filename contains strange characters? You know, windows is very demanding system:)
Thanks.

@pmarsceill

This comment has been minimized.

Show comment
Hide comment
@pmarsceill

pmarsceill Jan 17, 2012

The only way that I got this gem to work on a windows box is to manually install the gem from the zip file to /vendor/gem/paperclip , then added the :path => 'vendor/gem/paperclip' reference to my Gemfile.

That way you bypass the gem installer that tries to run the test that is failing and preventing it from being installed.

The only way that I got this gem to work on a windows box is to manually install the gem from the zip file to /vendor/gem/paperclip , then added the :path => 'vendor/gem/paperclip' reference to my Gemfile.

That way you bypass the gem installer that tries to run the test that is failing and preventing it from being installed.

@maratgaliev

This comment has been minimized.

Show comment
Hide comment
@maratgaliev

maratgaliev Jan 17, 2012

Thanks, but it's not a decision. I want to include gem 'paperclip' and it should work. It's normal.

Thanks, but it's not a decision. I want to include gem 'paperclip' and it should work. It's normal.

@seizmo

This comment has been minimized.

Show comment
Hide comment
@seizmo

seizmo Jan 18, 2012

I would also really appreciate this being fixed!

I think to test for question mark compatibility might be less important than breaking this gem for all Windows developers.

seizmo commented Jan 18, 2012

I would also really appreciate this being fixed!

I think to test for question mark compatibility might be less important than breaking this gem for all Windows developers.

@xxx

This comment has been minimized.

Show comment
Hide comment
@xxx

xxx Jan 19, 2012

Contributor

The question mark compat test is important. The correct fix is to remove the file from the repo, then re-create it in the setup for the set of tests that work on question mark files on non-windows platform. It's just a copy of one of the fixture images that are already in the repo.

Contributor

xxx commented Jan 19, 2012

The question mark compat test is important. The correct fix is to remove the file from the repo, then re-create it in the setup for the set of tests that work on question mark files on non-windows platform. It's just a copy of one of the fixture images that are already in the repo.

@jyurek

This comment has been minimized.

Show comment
Hide comment
@jyurek

jyurek Jan 19, 2012

Contributor

I don't believe that's the correct fix, because if someone uploads a file onto a Windows system, it will cause problems, even if the test doesn't run. This bug runs into a larger problem with URL escaping, which is what the best way to handle it all is. The "simple" way would be to bar any characters that are special in URLs or forbidden in file names, either by removal or converting to "_" or something. We tried URI escaping each interpolation, but that led to problems because recursion is possible. Finding out what characters are problematic on each FS might be similarly hairy.

It would be super awesome if someone could take a whack at this and submit a pull request, as my time is limited and I may not get a chance to sit down with this problem.

Contributor

jyurek commented Jan 19, 2012

I don't believe that's the correct fix, because if someone uploads a file onto a Windows system, it will cause problems, even if the test doesn't run. This bug runs into a larger problem with URL escaping, which is what the best way to handle it all is. The "simple" way would be to bar any characters that are special in URLs or forbidden in file names, either by removal or converting to "_" or something. We tried URI escaping each interpolation, but that led to problems because recursion is possible. Finding out what characters are problematic on each FS might be similarly hairy.

It would be super awesome if someone could take a whack at this and submit a pull request, as my time is limited and I may not get a chance to sit down with this problem.

@asarig

This comment has been minimized.

Show comment
Hide comment
@asarig

asarig Jan 22, 2012

the core problem is, paperclicp now use aws-sdk gem instead of aws-s3 and you get uninitialized constant AWS::S3::Base if you don' t upgrade to 2.5.0 ... which does not work on windows anymore because of question?mark.png

at a minimum the polite thing to do is fix the test case to be sensitive to the environment; the best is just not to have that test case.
thanks.

asarig commented Jan 22, 2012

the core problem is, paperclicp now use aws-sdk gem instead of aws-s3 and you get uninitialized constant AWS::S3::Base if you don' t upgrade to 2.5.0 ... which does not work on windows anymore because of question?mark.png

at a minimum the polite thing to do is fix the test case to be sensitive to the environment; the best is just not to have that test case.
thanks.

@maratgaliev

This comment has been minimized.

Show comment
Hide comment
@maratgaliev

maratgaliev Jan 23, 2012

I agree, let's change this test case to environment depended, and windows systems just skip it.

I agree, let's change this test case to environment depended, and windows systems just skip it.

@pmarsceill

This comment has been minimized.

Show comment
Hide comment
@pmarsceill

pmarsceill Jan 23, 2012

I also agree.

On Sun, Jan 22, 2012 at 10:55 PM, maratgaliev <
reply@reply.github.com

wrote:

I agree, let's change this test case to environment, and windows systems
just skip it.


Reply to this email directly or view it on GitHub:
#703 (comment)

I also agree.

On Sun, Jan 22, 2012 at 10:55 PM, maratgaliev <
reply@reply.github.com

wrote:

I agree, let's change this test case to environment, and windows systems
just skip it.


Reply to this email directly or view it on GitHub:
#703 (comment)

@asarig

This comment has been minimized.

Show comment
Hide comment
@asarig

asarig Jan 23, 2012

BTW the temporary workaround until this is fixed, especially if you work on both environments (win for dev and Heroku for deploy like I do) - is to have in your gemfile :

gem "aws-s3", :require => "aws/s3"
gem 'paperclip'
gem "aws-sdk"

seems to be working for me. Not ideal though, the Heroku slug will contain with unnecessary gem.

asarig commented Jan 23, 2012

BTW the temporary workaround until this is fixed, especially if you work on both environments (win for dev and Heroku for deploy like I do) - is to have in your gemfile :

gem "aws-s3", :require => "aws/s3"
gem 'paperclip'
gem "aws-sdk"

seems to be working for me. Not ideal though, the Heroku slug will contain with unnecessary gem.

@pmarsceill

This comment has been minimized.

Show comment
Hide comment
@pmarsceill

pmarsceill Jan 23, 2012

Another way to get it working is to download the gem as a zipfile to your
dev machine via github (don't use gem install or bundle install), unzip the
gem to /vendor/gems/paperclip, then in the gem file add it as:

gem 'paperclip', :path => 'vendor/gems/paperclip'

You then need to check in this directory to Git (if that's what you're
using for version control). Then the gem will be included in your
project's source, (not downloaded via bundle install). I've tested this
and it works on both Mac/Windows dev environments as well as deploying to
Heroku.

Patrick

On Mon, Jan 23, 2012 at 9:49 AM, Amnon Sarig <
reply@reply.github.com

wrote:

BTW the temporary workaround until this is fixed, especially if you work
on both environments (win for dev and Heroku for deploy like I do) - is to
have in your gemfile :

gem "aws-s3", :require => "aws/s3"
gem 'paperclip'
gem "aws-sdk"

seems to be working for me. Not ideal though, the Heroku slug will contain
with unnecessary gem.


Reply to this email directly or view it on GitHub:
#703 (comment)

Another way to get it working is to download the gem as a zipfile to your
dev machine via github (don't use gem install or bundle install), unzip the
gem to /vendor/gems/paperclip, then in the gem file add it as:

gem 'paperclip', :path => 'vendor/gems/paperclip'

You then need to check in this directory to Git (if that's what you're
using for version control). Then the gem will be included in your
project's source, (not downloaded via bundle install). I've tested this
and it works on both Mac/Windows dev environments as well as deploying to
Heroku.

Patrick

On Mon, Jan 23, 2012 at 9:49 AM, Amnon Sarig <
reply@reply.github.com

wrote:

BTW the temporary workaround until this is fixed, especially if you work
on both environments (win for dev and Heroku for deploy like I do) - is to
have in your gemfile :

gem "aws-s3", :require => "aws/s3"
gem 'paperclip'
gem "aws-sdk"

seems to be working for me. Not ideal though, the Heroku slug will contain
with unnecessary gem.


Reply to this email directly or view it on GitHub:
#703 (comment)

@nhjort

This comment has been minimized.

Show comment
Hide comment
@nhjort

nhjort Jan 24, 2012

Another workaround is to use paperclip version 2.4.4 which is the newest version that does not contain that commit. Put in your gemfile
gem 'paperclip', '~> 2.4.4'

then bundle install will work on windows. It would be nice if this was resolved, especially since it's only associated with a test case.

nhjort commented Jan 24, 2012

Another workaround is to use paperclip version 2.4.4 which is the newest version that does not contain that commit. Put in your gemfile
gem 'paperclip', '~> 2.4.4'

then bundle install will work on windows. It would be nice if this was resolved, especially since it's only associated with a test case.

@jrutt17

This comment has been minimized.

Show comment
Hide comment
@jrutt17

jrutt17 Jan 24, 2012

I'm trying to install Spree and paperclip 2.5.0 is a dependency (and I'm getting the same error). Win 7-x64.

Any suggestions? I can't put it in my project's gemfile because I can't create a Spree project w/o this!!

Thanks

jrutt17 commented Jan 24, 2012

I'm trying to install Spree and paperclip 2.5.0 is a dependency (and I'm getting the same error). Win 7-x64.

Any suggestions? I can't put it in my project's gemfile because I can't create a Spree project w/o this!!

Thanks

@maratgaliev

This comment has been minimized.

Show comment
Hide comment
@maratgaliev

maratgaliev Jan 24, 2012

Btw, we can't perform changes only in source code, because bundle install downloads source files, and file with incorrect name rises "Invalid argument error" on this stage. Test cases are not running at this time.

Btw, we can't perform changes only in source code, because bundle install downloads source files, and file with incorrect name rises "Invalid argument error" on this stage. Test cases are not running at this time.

@ghost ghost assigned sikachu Jan 27, 2012

@sikachu

This comment has been minimized.

Show comment
Hide comment
@sikachu

sikachu Jan 27, 2012

Contributor

Ok, so I'm going to fix this problem, and here's what I'm going to do:

  1. We're going to convert some of the special characters in the file name into an underscore, such as :;\/?&+=. You can turn this off as well if you don't want, but it's not recommmend to do so as we're also seeing that Rails sometime cannot handle some of these special characters in the image_tag.
  2. We'll remove the question?mark.png file and using StringIO to test the functionality instead. This will make sure that people who're using Windows will be able to use the gem, and also safely save file onto their system.
Contributor

sikachu commented Jan 27, 2012

Ok, so I'm going to fix this problem, and here's what I'm going to do:

  1. We're going to convert some of the special characters in the file name into an underscore, such as :;\/?&+=. You can turn this off as well if you don't want, but it's not recommmend to do so as we're also seeing that Rails sometime cannot handle some of these special characters in the image_tag.
  2. We'll remove the question?mark.png file and using StringIO to test the functionality instead. This will make sure that people who're using Windows will be able to use the gem, and also safely save file onto their system.

@jyurek jyurek referenced this issue Jan 27, 2012

Closed

Bad urls #661

@filipegiusti

This comment has been minimized.

Show comment
Hide comment
@filipegiusti

filipegiusti Jan 27, 2012

@sikachu please add url special characters like []#. That would probably fix problems with paperclip generating invalid urls.

@sikachu please add url special characters like []#. That would probably fix problems with paperclip generating invalid urls.

@sikachu sikachu closed this Jan 27, 2012

MSNexploder pushed a commit to MSNexploder/paperclip that referenced this issue Jan 31, 2012

@alexdowad

This comment has been minimized.

Show comment
Hide comment
@alexdowad

alexdowad Apr 14, 2012

I have a Spree project which runs on a Linux server, but I am trying to also get it running locally, just to do a few simple tests. I am not going to try uploading files with question marks in the filename while testing locally, and in production, it won't be an issue anyways. I can install other versions of Paperclip, but Spree specifically requires 2.5.0. This issue is causing a lot of pain! The patch from @MSNexploder doesn't help, because a "bundle install" of Spree always tries to install the 2.5.0 gem, which doesn't include the patch.

I have a Spree project which runs on a Linux server, but I am trying to also get it running locally, just to do a few simple tests. I am not going to try uploading files with question marks in the filename while testing locally, and in production, it won't be an issue anyways. I can install other versions of Paperclip, but Spree specifically requires 2.5.0. This issue is causing a lot of pain! The patch from @MSNexploder doesn't help, because a "bundle install" of Spree always tries to install the 2.5.0 gem, which doesn't include the patch.

@sikachu

This comment has been minimized.

Show comment
Hide comment
@sikachu

sikachu Apr 14, 2012

Contributor

I think in that case I we should contact Spree to upgrade to newer version of Paperclip. There's a file with question mark in there with make the install fail, and I'm not sure what's the way to get around that except upgrading.

Contributor

sikachu commented Apr 14, 2012

I think in that case I we should contact Spree to upgrade to newer version of Paperclip. There's a file with question mark in there with make the install fail, and I'm not sure what's the way to get around that except upgrading.

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Apr 14, 2012

Hi Alex. If you upgrade to either the 1-0-stable or 1-1-stable branch of Spree using this line in your Gemfile rather than a traditional gem line:

gem 'spree', :github => "spree/spree", :branch => "1-0-stable"

That will make your application use the latest stable we have for that version and will fix the Paperclip problem you're having here.

radar commented Apr 14, 2012

Hi Alex. If you upgrade to either the 1-0-stable or 1-1-stable branch of Spree using this line in your Gemfile rather than a traditional gem line:

gem 'spree', :github => "spree/spree", :branch => "1-0-stable"

That will make your application use the latest stable we have for that version and will fix the Paperclip problem you're having here.

@alexdowad

This comment has been minimized.

Show comment
Hide comment
@alexdowad

alexdowad Apr 14, 2012

For anyone else who runs into the same problem on Windows, I just worked around it by installing 2.6.0, renaming the gemspec file in lib/ruby/gems/1.9.1/specifications from paperclip-2.6.0.gemspec to paperclip-2.5.0.gemspec, and editing the file to change "2.6.0" to "2.5.0". It seems that the files for 2.5.0 were actually installed into the lib/ruby/gems/1.9.1/gems directory before, so I'm hoping the combination of (edited) 2.6.0 gemspec file and 2.5.0 source files will not cause any adverse results.

For anyone else who runs into the same problem on Windows, I just worked around it by installing 2.6.0, renaming the gemspec file in lib/ruby/gems/1.9.1/specifications from paperclip-2.6.0.gemspec to paperclip-2.5.0.gemspec, and editing the file to change "2.6.0" to "2.5.0". It seems that the files for 2.5.0 were actually installed into the lib/ruby/gems/1.9.1/gems directory before, so I'm hoping the combination of (edited) 2.6.0 gemspec file and 2.5.0 source files will not cause any adverse results.

@alexdowad

This comment has been minimized.

Show comment
Hide comment
@alexdowad

alexdowad Apr 14, 2012

@radar, thanks for the suggestion, but... this Spree app is a client's, not mine, and I've just been hired to add a few simple things to the existing code. For obvious reasons, I want to use the exact same version of Spree as what the client is running on his server. Since Spree is under active development and changing all the time, I wouldn't want to test my modifications on anything else than the exact version which will be used. This is not a big-money job, so I can't consider upgrading all the existing code, including all the modifications the client has already made, to a newer version of Spree.

@radar, thanks for the suggestion, but... this Spree app is a client's, not mine, and I've just been hired to add a few simple things to the existing code. For obvious reasons, I want to use the exact same version of Spree as what the client is running on his server. Since Spree is under active development and changing all the time, I wouldn't want to test my modifications on anything else than the exact version which will be used. This is not a big-money job, so I can't consider upgrading all the existing code, including all the modifications the client has already made, to a newer version of Spree.

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Apr 14, 2012

Ok then, there's nothing much else we can do from our end. I think your solution is a bit hacky and you would probably do better if you forked paperclip 2.6.0 into vendor/gems and pointed your Gemfile there, rather than modifying the gemspec on every single system.

radar commented Apr 14, 2012

Ok then, there's nothing much else we can do from our end. I think your solution is a bit hacky and you would probably do better if you forked paperclip 2.6.0 into vendor/gems and pointed your Gemfile there, rather than modifying the gemspec on every single system.

@alexdowad

This comment has been minimized.

Show comment
Hide comment
@alexdowad

alexdowad Apr 14, 2012

@radar, with all due respect, my solution is not "a bit" hacky. It's a stinky, festering hack, and I hate myself for even thinking of it. It's just a one-time thing to get the app up locally for a few simple tests, before moving the new code to "greener pastures" on a Linux-based server.

@radar, with all due respect, my solution is not "a bit" hacky. It's a stinky, festering hack, and I hate myself for even thinking of it. It's just a one-time thing to get the app up locally for a few simple tests, before moving the new code to "greener pastures" on a Linux-based server.

@alan50

This comment has been minimized.

Show comment
Hide comment
@alan50

alan50 Apr 26, 2012

@radar Hey Radar,
if i add "gem 'spree', :github => "spree/spree", :branch => "1-0-stable"" to my gemfile the following fault message appears: C:\Sites\mystore>bundle install
You passed :github as an option for gem 'spree', but it is invalid.
What should i do?
Sorry i m a rookie :) Thanks!

alan50 commented Apr 26, 2012

@radar Hey Radar,
if i add "gem 'spree', :github => "spree/spree", :branch => "1-0-stable"" to my gemfile the following fault message appears: C:\Sites\mystore>bundle install
You passed :github as an option for gem 'spree', but it is invalid.
What should i do?
Sorry i m a rookie :) Thanks!

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Apr 26, 2012

@alan50 What version of Bundler are you using? The github option was only recently introduced. I would recommend you upgrade the version of Bundler that you are using.

radar commented Apr 26, 2012

@alan50 What version of Bundler are you using? The github option was only recently introduced. I would recommend you upgrade the version of Bundler that you are using.

@alan50

This comment has been minimized.

Show comment
Hide comment
@alan50

alan50 Apr 26, 2012

@radar Good suggestion. I succeeded in installing spree. But if i m starting the webserver only the welcome aboard page of ruby on rails is presented.
How can i configure spree? I wasn't asked to install sample data or things like this.
thx.

alan50 commented Apr 26, 2012

@radar Good suggestion. I succeeded in installing spree. But if i m starting the webserver only the welcome aboard page of ruby on rails is presented.
How can i configure spree? I wasn't asked to install sample data or things like this.
thx.

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Apr 26, 2012

Did you run rails g spree:install as mentioned in the Getting started guide?

radar commented Apr 26, 2012

Did you run rails g spree:install as mentioned in the Getting started guide?

@alan50

This comment has been minimized.

Show comment
Hide comment
@alan50

alan50 Apr 28, 2012

@radar It works! Thanks a lot. But there is a new problem if i m trying to build an integrated extension. First of all i cant run bundle install inside the extension because there are the known problems with paperclip 2.5.0. And secondly i cant create a resource because the following fault message appears.
C:\Sites\myshop\spree_FlagPromotions>rails g resource some_bar
internal:lib/rubygems/custom_require:29:in require': no such file to load -- C:/Sites/myshop/spree_FlagPromotions/config/boot (LoadError) from <internal:lib/rubygems/custom_require>:29:inrequire'
from script/rails:4:in `

'
It seems to be like spree doesnt like me or i m just to stupid?!. ^^

alan50 commented Apr 28, 2012

@radar It works! Thanks a lot. But there is a new problem if i m trying to build an integrated extension. First of all i cant run bundle install inside the extension because there are the known problems with paperclip 2.5.0. And secondly i cant create a resource because the following fault message appears.
C:\Sites\myshop\spree_FlagPromotions>rails g resource some_bar
internal:lib/rubygems/custom_require:29:in require': no such file to load -- C:/Sites/myshop/spree_FlagPromotions/config/boot (LoadError) from <internal:lib/rubygems/custom_require>:29:inrequire'
from script/rails:4:in `

'
It seems to be like spree doesnt like me or i m just to stupid?!. ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment