Skip to content

Commit a46b04e

Browse files
committed
Add instructio to build platform-specific gem
1 parent c579def commit a46b04e

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -392,19 +392,6 @@ Please read our [thread_test.rb](https://github.com/rails-sqlserver/tiny_tds/blo
392392

393393
This is possible. Since FreeTDS v1.0, utf-16 is enabled by default and supported by tiny_tds. You can toggle it by using `use_utf16` when establishing the connection.
394394

395-
## Compiling Gems for Windows and Linux
396-
397-
For the convenience of Windows and Linux users, TinyTDS ships pre-compiled gems for supported versions of Ruby on Windows. In order to generate these gems, [rake-compiler-dock](https://github.com/rake-compiler/rake-compiler-dock) is used. This project provides several [Docker images](https://registry.hub.docker.com/u/larskanis/) with rvm, cross-compilers and a number of different target versions of Ruby.
398-
399-
Run the following rake task to compile the gems for Windows. This will check the availability of [Docker](https://www.docker.com/) and will give some advice for download and installation. When docker is running, it will download the docker image (once-only) and start the build:
400-
401-
```
402-
$ rake gem:native
403-
```
404-
405-
The compiled gems will exist in `./pkg` directory.
406-
407-
408395
## Development & Testing
409396

410397
First, clone the repo using the command line or your Git GUI of choice.
@@ -451,6 +438,26 @@ $ rake TINYTDS_UNIT_DATASERVER=mydbserver TINYTDS_SCHEMA=sqlserver_2017
451438
$ rake TINYTDS_UNIT_HOST=mydb.host.net TINYTDS_SCHEMA=sqlserver_azure
452439
```
453440

441+
### Compiling Gems for Windows and Linux
442+
443+
For the convenience, TinyTDS ships pre-compiled gems for supported versions of Ruby on Windows and Linux. In order to generate these gems, [rake-compiler-dock](https://github.com/rake-compiler/rake-compiler-dock) is used.
444+
445+
Run the following rake task to compile the gems. This will check the availability of [Docker](https://www.docker.com/) and will give some advice for download and installation. When docker is running, it will download the docker image (once-only) and start the build:
446+
447+
```shell
448+
bundle exec rake gem:native
449+
```
450+
451+
The compiled gems will exist in `./pkg` directory.
452+
453+
If you only need a specific gem for one platform and architecture, run this command:
454+
455+
```shell
456+
bundle exec rake gem:native:x64-mingw-ucrt
457+
```
458+
459+
All the supported architectures and platforms are listed in the `Rakefile` in the `CrossLibraries` constant.
460+
454461
## Help & Support
455462

456463
* Github Source: http://github.com/rails-sqlserver/tiny_tds

0 commit comments

Comments
 (0)