At the age of 12, Ramírez left his home in Nicaragua to attend school in San Salvador, El Salvador. The school which he attended, Fundación Educando a un Salvadoreño, was aimed at helping baseball and soccer athletes training in their respective sports, while also offering academic support. From there, Ramírez was discovered by Jorge Bahaia, who introduced him to Seattle Mariners scoutsUbaldo Heredia and Bob Engle. Engle also signed players José López, Ryan Rowland-Smith, and Carlos Triunfel.
Professional career
Seattle Mariners
On September 1, 2007, Ramírez officially signed with Seattle Mariners. Ramírez began his professional baseball career in 2008 with the rookie-levelVSL Mariners of the Venezuelan Summer League. That season, he compiled a 4–1 record with a 2.86 earned run average, one complete game, and 46 strikeouts in 13 games, 11 starts. In 2009, Ramírez continued playing with the VSL Mariners. Before the season, the Seattle Mariners minor league director Pedro Grifol compared Ramírez to Major League Baseball pitcherDoug Fister. That season, Ramírez compiled an 11–1 record with a 0.51 ERA, and 80 strikeouts in 14 games, 13 starts. He led the Venezuelan Summer League in wins, ERA, innings pitched, and strikeouts. After the season, the Seattle Mariners named Ramírez as the pitcher of the year in their minor league organization. He participated in the Mariners instructional league in Arizona after the 2009 season. Ramírez spent the early part of the 2010 season in extended spring training with the Seattle Mariners. He was assigned to the Class-AClinton LumberKings in early-April. On the season, Ramírez was both a Midwest League mid-season all-star and a post-season all-star. He went 10–4 with a 2.97 ERA, one complete game, one save, and 117 strikeouts in 26 games, 23 starts with Clinton. After the season, Ramírez was named the LumberKings Pitcher of the Year. At the end of the year, Erasmo was awarded in Nicaragua Athlete of the Year by the ACDN over Everth Cabrera. In 2013, Ramírez was going to join the Mariners starting roster before the start of the regular season before injuring his triceps. He eventually spent time in Class AAA before making his debut of the season with the Mariners on July 11 against the Boston Red Sox, but allowed seven runs in 4 2/3 innings. The following day, Ramírez was sent down to the Everett AquaSox in order to allow him to stay on a regular rotation during the Major League All-Star break, and started July 17's game against the Vancouver Canadians, giving up two runs on six hits while striking out ten in 5 1/3 innings as the AquaSox won 7-6.
Tampa Bay Rays
On March 31, 2015, Ramírez was traded to the Tampa Bay Rays for Mike Montgomery. Ramírez struggled in his first month with the Rays, posting an 0-1 record with a 12.71 ERA. But, when he came back in mid-May from the Durham Bulls he was better for the rotation and team, putting up great numbers for the rest of the season. On September 14 against the New York Yankees he went 7 hitless innings. Ramírez finished the season 11-5 with a 3.75 ERA in 163 innings pitched. In 2016, Ramírez made a more permanent switch to the bullpen, specifically in long relief situations. Ramírez ended the season making appearances in 64 games, throwing 90 innings posting a 3.77 ERA. In 2017, Ramírez started as an important reliever out of the bullpen, but when struggling youngster Blake Snell was demoted, Ramírez was put in the starting rotation. On May 28, Ramírez was forced to come in and get a save in a fifteen inning affair with the Minnesota Twins. On May 29, Ramírez became the first pitcher since Dennis Martinez, Ramírez's childhood idol, to start the next game before receiving a save.
Return to Seattle
On July 28, 2017, the Rays traded Ramírez back to the Seattle Mariners for Steve Cishek. On August 23 that season, Ramírez went 2-for-3 at the plate in a game against the Atlanta Braves, recording his first MLB hit and RBI. On May 1, 2018, he was placed on the disabled list. He ended the season sporting a career worst 6.50 ERA in 10 starts. In November 2018, Ramírez elected to become a free agent after clearing waivers and being outrighted off the Mariner's 40-man roster.
Boston Red Sox
On December 18, 2018, Ramírez signed a minor league contract with the Boston Red Sox. He started the 2019 season with the Triple-APawtucket Red Sox. On April 16, his contract was selected by Boston, and he made his Red Sox debut the same day, allowing four runs in three innings of relief during an 8–0 loss to the Yankees in New York. He was designated for assignment on April 19, and sent outright back to Pawtucket on April 21. With Pawtucket during the 2019 season, Ramírez was 6–8 with a 4.74 ERA and 95 strikeouts in innings. He elected free agency on October 1.
New York Mets
On January 26, 2020, Ramirez signed a minor league deal with the New York Mets.